cobrain
Create your brainGo to your brain
Blog · 23 October 2026 · 6 min

Why your AI forgets mid-conversation: the context window

Why ChatGPT and Claude lose track in long chats: what the context window is, what happens when it fills up, why attention fades, and what you can do.

You set the rules at the start of the chat: British spelling, no bullet points, the client's name is always written in full. Forty messages later the bullet points are back and the name is shortened. You didn't change anything. The AI just stopped paying attention to the top of the conversation.

The memory feature has nothing to do with it. The cause is the context window, and once you know how it works, the forgetting gets predictable. Below: what the context window is, the two reasons an AI loses track inside one chat, and what to do about each. Facts about Claude and Claude Code were checked on Anthropic's help center and documentation on 23 October 2026.

What the context window is

Every time you send a message, the model doesn't "remember" the conversation. It reads it again. What it gets on that turn is the context: your messages and its replies so far, the files you attached, the project instructions, the results of tools and connectors, and the instructions the app adds on its own. The context window is the maximum size of that bundle, measured in tokens.

What doesn't fit, the model can't see. What fits, it sees all at once, but not with the same attention everywhere. Those are the two problems.

How big is the window? It depends on the model and the plan. In Claude chat on paid plans, Anthropic lists 1M tokens for the newest models (Opus 5.5, Sonnet 5.5, Haiku 5.5 and Fable 5.1, among others), 500K for some older ones such as Opus 4.8 and Sonnet 4.6, and 200K for the rest. In ChatGPT the window also changes with plan and model. When we checked on 10 October, OpenAI's business pricing page gave Business 54K tokens on Instant and 256K on reasoning models; we collected what each company publishes in ChatGPT vs Claude usage limits.

Reason one: the window fills up

A long chat grows on every turn, and a pasted report or a big tool result fills the window faster than the message count suggests. Apps don't just stop when that happens. In Claude, on paid plans with code execution turned on, the app manages the context for you: as the conversation nears the limit, it summarizes earlier messages to make room. Anthropic says the full chat history is kept and can still be referenced, and that most conversations can keep going this way. There are two costs. Conversations that trigger this use more of your usage limit, as we covered in why Claude hits its usage limit so fast. And a summary is shorter than the original, so details can drop out.

Claude Code is more explicit. Its documentation says that as context fills up it first clears older tool outputs, then summarizes the conversation if needed. Your requests and key code snippets are preserved, but "detailed instructions from early in the conversation may be lost". The rule about bullet points from your first message is that kind of instruction. If one file or tool output is so large that the context refills right after every summary, Claude Code stops auto-compacting after a few attempts and shows an error.

We found no OpenAI help page describing what ChatGPT does when a chat outgrows its window, so we won't guess. The window has an edge in every model, though, and something has to give.

Reason two: attention thins out before the window is full

This one is less obvious. A model can start losing details long before it runs out of room.

Anthropic's engineering team calls it context rot: as the number of tokens in the window grows, the model's ability to recall information from it goes down. Their explanation, published on 29 September 2025, is that in the transformer architecture every token attends to every other token, which makes n² relationships for n tokens. The model has what they call an "attention budget", and every extra token draws on it.

Researchers had measured something close to this earlier. In "Lost in the Middle" (Liu and others, published in Transactions of the Association for Computational Linguistics in 2024), models answered best when the relevant information sat at the beginning or the end of the input, and worse when it was in the middle. The drop got bigger as inputs got longer, including on models built for long contexts.

So a bigger window helps you fit more, but it doesn't guarantee the model weighs everything equally. A rule set in message 3 of a 60-message chat is in the middle, surrounded by everything that came after.

What you can do inside one chat

Start a new chat when the topic changes. Old history still travels with every message and competes for attention.

Repeat the rules that matter when the chat gets long, or put them where the app loads them every time: project instructions in Claude, CLAUDE.md in Claude Code. Anthropic's Claude Code docs say it directly: put persistent rules in CLAUDE.md rather than relying on conversation history. You can also add a "Compact Instructions" section to CLAUDE.md to steer what survives a summary, or run /compact with a focus, like /compact focus on the API changes.

Check what's taking space. In Claude Code, /context shows it. Anthropic's help center also suggests keeping project instructions short and turning off tools and connectors you don't use, because they take context too. More on the Claude Code side in how to reduce token usage in Claude Code.

Hand over less. Pasting a whole document to ask about one paragraph fills the window with text the model then has to weigh. Claude Projects help here: Anthropic says they use retrieval, so only relevant content is loaded.

Why a new chat starts from zero

A fresh chat clears the clutter, and everything else with it. Claude Code's documentation says each new session starts with a fresh context window, without the history of earlier sessions. Only what you saved somewhere else carries over, like CLAUDE.md or auto memory.

That's the real tension. A long chat forgets the beginning. A new chat never knew it. The built-in memories of Claude and ChatGPT cover part of the gap, mostly preferences and short facts about you. A real project's decisions, numbers and constraints usually get pasted back in by hand.

How Cobrain fits

Cobrain doesn't make the context window bigger; nothing outside the model can. It changes what goes into it.

Cobrain is a memory in Markdown notes, in real folders, that Claude, ChatGPT, Claude Code, Codex and other AIs read and write through MCP. At the start of a chat the AI gets a short summary of the project instead of every file, and opens the notes it needs when it needs them. We measured this on a real project in our own brain: handing over in full the files that project marks as always needed comes to about 69,400 tokens, against roughly 9,900 for Cobrain's opening summary plus its tool definitions. The method is on the context costs page.

Fewer tokens at the start means more room left, and less in the middle for the model to lose. And when a chat runs long, the decision you took in message 3 can live in a note, where any new chat can find it again. Connecting Claude takes a few minutes with the Claude guide.

Quick answers

Why does ChatGPT or Claude forget what I said earlier in the same chat? Two reasons. When the chat nears the context window limit, the app may summarize older parts, and anything past the limit falls outside what the model sees. And even before that, models pay less attention to details buried in the middle of a long input.

How big is Claude's context window? On paid plans in chat, 1M tokens on the newest models, 500K on some older ones and 200K on the rest, according to Anthropic's help center on 23 October 2026.

Does a bigger context window fix forgetting? It lets more fit, so less gets summarized away. It doesn't stop attention from thinning on long inputs. Research on long contexts found models do worse with information in the middle.

How do I stop Claude Code forgetting my instructions after compaction? Put them in CLAUDE.md, which loads at the start of every session, instead of only in the chat. You can add a "Compact Instructions" section there or use /compact with a focus.

Free, no card needed

Start with a single note.

It is free and no card is needed. You sign in with a link sent by email, connect your AI and start building a memory that does not stay locked inside a chat.

Create your brain, freeGo to your brainA thousand notes, as many AIs as you want to connect.