People describe AI assistants as forgetful, which implies they remember and then lose things. They do neither. The model has no memory between messages at all — every single turn, the entire conversation is handed to it again from the start, and it reads the lot as if for the first time. Once that clicks, almost every strange behaviour makes sense.

The model is stateless

When you send a second message, the application does not send just that message. It sends:

  1. The system instructions.
  2. Your first message.
  3. The model's first reply.
  4. Your new message.

The model reads all of it, produces a reply, and retains nothing. On the next turn the whole thing is sent again, now longer.

So the conversation is not something the model is holding. It is a document that is re-read from the beginning, every time, by something with no recollection of having read it before.

What the context window actually limits

The context window is how much it can read in one go, measured in tokens — roughly three quarters of a word each in English, and less efficient for Urdu and other non-Latin scripts.

Everything shares that budget:

  • The system prompt, which you usually cannot see.
  • The entire conversation so far.
  • Any documents or files attached.
  • The reply being generated.

Modern windows are very large — our piece on GPT-6.2 Astra's features covers a window above a million tokens — but large is not infinite, and local models are usually far smaller. Our quantisation guide covers how context competes with the model itself for memory on your own hardware.

What happens when it fills

Something has to go, and the usual options are:

  • Truncation. The oldest messages are dropped. The model is simply not shown the beginning any more.
  • Summarisation. Earlier turns are compressed into a shorter note, which keeps the gist and loses specifics — names, numbers, exact wording.

This explains the classic failure. You establish a detailed constraint in message three, and by message forty it is being ignored. The model has not changed its mind. It can no longer see message three.

It also explains why starting a fresh conversation often works better than arguing with a long one.

The cost nobody notices

If you use an API, you pay for input tokens on every request — and the input includes the whole conversation, resent each turn.

A long conversation therefore costs much more than it appears to. The twentieth message in a thread costs far more than the first, because it carries all nineteen previous ones with it. This is why caching mechanisms exist, and why cost on a chat application scales worse than the message count suggests.

So what are "memory" features?

They store facts about you somewhere outside the model — a database — and when relevant, insert them back into the context before the model runs.

That is retrieval, not recall. Each time, a note is handed to a reader who has never seen it before. Useful, and worth understanding, because it means what the system "remembers" is whatever something decided to save and retrieve, not everything you said.

The same mechanism underlies RAG, where the documents retrieved are yours rather than facts about you. Our explainer on RAG against fine-tuning covers the choice, and the private RAG tutorial builds one.

How to work with it rather than against it

  • Restate what matters. If a constraint is important, repeat it. You are not nagging; you are putting it back in view.
  • Start fresh for new tasks. A long thread carries cost and noise into unrelated work.
  • Put requirements in the current message, not fifty turns back.
  • Attach the document rather than describing it from memory of an earlier turn.

For what is going on underneath all this, see how generative AI works and why chatbots hallucinate — which is a different failure with a different cause, and often blamed for what is really a context problem.

Written by the WritePures newsroom. Spotted something that needs updating? Tell our editors.