Academy · Lesson 05 · Builds on 2

Why does ChatGPT forget? The context window, explained simply

The model has no memory. Every message, the app sends it the whole conversation again, and the conversation fits in a window of fixed size. When the window is full, the beginning falls off. Everything about 'forgetting' follows from that.

Rohan KumarSansser
14 min1 lab
By the end you can
  • Explain why 'the model remembers our chat' is the wrong picture, and what is actually happening
  • Say what a context window is, in tokens, and why documents fill it fastest
  • Describe 'lost in the middle' and why a bigger window does not fully fix it
  • Tell saved memory, chat history search and the context window apart
Part 1

There is no memory. There is a window.

When you send your fortieth message, the model does not remember the first thirty-nine. The app pastes them in. Every single turn, the whole conversation so far, plus the app's hidden instructions, plus any document you attached, is sent to the model as one long piece of text, and the model does its one move on the end of it. The model itself is frozen and stateless. Close the tab, open it, and the app pastes the history back in.

That long piece of text has a maximum length, counted in tokens, called the context window. Lesson two showed why: every token attends to every earlier token, and that cost grows with the square of the length. Windows have grown from about 4,000 tokens in 2022 to hundreds of thousands in the best models now, but every window has an edge, and the app does not show you where you are.

Lab

Fill one yourself

We made the window small on purpose so you can fill it in a minute. Watch two things: how little a message costs compared with a document, and what happens at the edge.

Lab 01Fill the windowReady

A simulation with honest sizes. A short message is about 120 tokens, a model's answer about 350, ten pages of PDF about 6,000. When the window is full the oldest turns drop off the front, and nothing tells you.

Part 3

Why it gets worse before it is full

Dropping the beginning is the obvious failure. The subtle one is that quality falls before the window is full. In 2023 a Stanford and Berkeley team put a fact somewhere inside a long input and asked models to find it. Accuracy was high when the fact was at the start or the end, and dropped when it was in the middle. They called the paper "Lost in the Middle". In 2025 the company Chroma tested eighteen current models on growing inputs and found performance declined with length in every experiment, even on tasks the models could do easily at short length. Their name for it, context rot, has stuck.

So "my chat got dumber over the afternoon" is not your imagination and not the model being tired. Your important instruction from message three is in the middle of a very long input, where retrieval is weakest, competing with everything since.

Part 4

Three things people call memory

The confusion in every forum thread is that three different things share the word.

The context window is the conversation pasted in each turn. It is the only thing the model actually "sees". It ends when the chat ends.

Saved memories are short notes the app keeps about you and pastes into the window at the start of every chat. They are text, visible in your settings, editable. They are not the model learning.

Chat history search is the app looking through your old conversations when it thinks one is relevant and pasting the relevant bit into the window. Also text, also pasted. Our how-to on memory shows the switches for all three products.

Every one of these is the same mechanism: putting text in the window. The model has no other way to know anything about you. When a model "remembers" your name across chats, a note that says your name was pasted in before you typed.

Check yourself

What this changes about how you work

Four habits fall out of the picture, and they are the ones in our how-to on long chats. Put rules you care about in the project or custom instructions, which are pasted at the start of every chat, rather than once at the top of one long chat. Say the rule again in the message where it matters, because recent beats middle. Attach documents to a project instead of pasting them, so they are cached and placed well. And when a chat is long, ask for a handoff note and start fresh: a new chat with a 300-word summary at the top beats forty thousand tokens of history with the important part lost in the middle.

Bigger windows help and will keep growing. They do not make the middle reliable, and they make each message more expensive, which is the subject of the usage-limits how-to.

Q1What does the model receive when you send your 40th message?

Q2What did 'Lost in the Middle' find?

Q3A model greets you by name in a new chat. What happened?

Remember

What to take with you

  1. The model has no memory. The app pastes the whole conversation in every turn, into a window of fixed size in tokens.
  2. Documents fill the window fastest. When it is full the beginning falls off, silently.
  3. Quality drops before the window is full: facts in the middle of a long input are found least reliably (lost in the middle, context rot).
  4. Saved memory and chat search are notes pasted into the window. Same mechanism, different source.
Questions

Questions people are asking

What is a context window? The maximum amount of text, counted in tokens, a model can take in at once. The app sends the whole conversation inside it every turn. When the conversation exceeds it, the oldest parts are dropped or compressed.

Why does ChatGPT forget previous messages in long conversations? Because the conversation has outgrown the context window, so early messages are no longer sent to the model, and because retrieval from the middle of a long input is unreliable even before that point.

Does ChatGPT remember previous conversations? Only through features that paste text into the window: saved memories, which are notes about you, and chat history search, which pulls relevant bits of old chats. The model itself keeps nothing between turns.

How many tokens is a context window? It depends on the model and plan, from a few thousand to hundreds of thousands. The apps do not display a counter. Vendors list sizes on their model pages, and they change often.

How does ChatGPT memory work? The app keeps short notes it has saved about you and includes them at the start of each conversation. You can read, edit or delete them in Settings under Personalization. It is stored text, not learning.

Sources

  1. Liu et al., Lost in the Middle: How Language Models Use Long Contexts, Jul 2023 arxiv.org/abs/2307.03172
  2. Chroma Research, Context Rot: How Increasing Input Tokens Impacts LLM Performance, Jul 2025 trychroma.com/research/context-rot
  3. OpenAI Help Center, Memory FAQ help.openai.com/en/articles/8590148-memory-faq
  4. Claude Help Center, Using memory and chat search in Claude support.claude.com/en/articles/11817273
Newsletter

One email a week. Written by people.

New lessons and how-tos, the tools we tested and what we think, in one short email.

Free · Unsubscribe anytime