Core Pain

AI Keeps Forgetting Context in the Same Chat — What's Actually Happening

What's actually happening

You're halfway through a chat, you reference something you said fifteen messages ago, and the assistant looks at you blankly. It feels like a bug. It isn't. When AI keeps forgetting context inside a single conversation, the cause is structural, and once you see it, you stop blaming the model.

A model doesn't store your conversation the way a person stores a memory. It holds a context window — a fixed amount of tokens it can attend to at any moment. Everything you and it have said lives in that window, and every new message takes up space in it. When the window is full, the system has to fit new input in, which means older content gets trimmed, compressed, or dropped.

So the thing you said earlier isn't "forgotten" in the way you forget a name. It has physically left the model's view.

The window is a working set, not a memory

Think of the context window as a whiteboard, not a filing cabinet. You can write a lot on it, but there's a fixed size, and when you need room for the next idea, you erase the oldest line. The erasure is the mechanism:

That's why the same assistant can recite a detail from minutes ago and then contradict it a few turns later. The detail didn't get contradicted — it got evicted.

Why it happens to your specific details

Here's the part that makes it frustrating rather than just confusing. The system doesn't trim by importance. It trims by position — the oldest content goes first, regardless of whether it's the most critical thing you've said.

That means your earliest messages are the most vulnerable, and those are usually the most important: - The brief you opened with. - The constraints you set out. - The context you assumed were obvious.

By the time you're deep into a working session, the model may be operating without the very instructions that set everything up. It's not that it ignored them. They were the first to fall off the whiteboard.

The key insight An assistant that "keeps forgetting context" isn't being careless. It has no durable store. The conversation only exists for as long as it stays inside a finite window — so the fix is to move the memory out of the window, not into a bigger one.

Why the usual fixes don't hold

The common advice is to prompt harder: re-state your requirements, ask the model to summarise, paste a condensed version back in. That works... until it doesn't.

It's the difference between tidying a whiteboard and getting a filing cabinet. Tidying helps in the moment; it doesn't stop the next lesson from being erased.

How a bigger window quietly fails

A larger context window feels like the obvious answer. And it does help — for a while. But think about what it's actually doing: it gives the whiteboard more space. The same displacement still happens, just further down the conversation.

A bigger window moves the cliff. It doesn't remove it.

A mental model that helps

You've seen the whiteboard that erases itself. Now stop asking how to cram more onto it — and start asking where the notebook is.

What keeps the thread

The durable answer is persistence. Give the agent a memory that sits outside the context window — a store it can read from and write to across the whole relationship:

That's the architecture difference between an assistant that replies and one that remembers you.

Frequently asked

"Is this a bug I should report?" No. It's how the default architecture works. A window has to shed content to make room.

"Will a bigger context window fix it?" It delays it. The shedding still happens.

"Can I just paste my brief every time?" You can, and it works until it doesn't — and you become the memory in the process.

The bottom line

AI keeps forgetting context because the context window is a disposable scratchpad, not a memory. The model is fine; the storage model is the problem. Stop working around the window — give your AI something that lasts.

Read next: why AI loses context when the chat fills up and the difference between a context window and context length.

Using Codex? Keep the thread through compaction.

Seamless Context saves a bounded summary of your whole Codex conversation just before each compaction and gives it back afterwards, once. In our tests on GPT-5.6 Sol it brought back all 11 planted facts after six compactions; the same chat without it kept none. Where Codex already remembers well (GPT-5.6 Terra and Luna) it adds little. Windows, Codex Desktop.