Reference

The context window: how much AI can keep in mind and what to do when it is not enough

What context windows and tokens are, why AI loses details in a long conversation, and simple ways to prevent it.

In this articleWhat is a context window?

You have been discussing a commercial proposal with AI for two hours. At the start, you agreed: prices exclude VAT and delivery takes six weeks. Yet the new draft again includes VAT and says ‘four weeks’. The model is not arguing with you — it has simply stopped relying on what was said at the start.

The reason is the context window: all the text the model can draw on when writing a response. The window has a limit, and even before reaching it, the model notices details less reliably in a long conversation. Here is how it works and what an ordinary user can do about it.

What is a context window?

Anthropic calls the context window the model's ‘working memory’. It is not everything the model learnt during training, but only the text of the current request: your messages, its replies, attached files and the answer it is writing right now.

What sits in the context window: instructions, files, the whole conversation and the answer being written now
The model does not remember earlier messages: the app sends it the whole history again every time.

The model does not remember a conversation between messages. With each new message from you, the application sends it the entire history again: earlier questions and answers plus the new question. So the conversation grows with every step, filling the window.

The distinction between model, chat and agent is explained in ‘Chat, model and agent’. For now, one point is enough: everything the model ‘knows’ about your task at that moment is in the window.

Tokens in simple terms

Window size is measured neither in words nor pages, but in tokens. A token is a piece of text the model works with: a whole short word, part of a long word or a single character.

Google offers a rule of thumb for its Gemini models: one token is about four characters, and 100 tokens are around 60–80 English words. Anthropic notes that the ratio depends on the model and language. The figures may differ for Russian, Slovak or German text; only a token count for the specific model gives the exact number.

Everything sent to the model goes into the window. According to Anthropic's documentation, when using an application programming interface (API), this includes system instructions, all messages, attached documents and images, tool descriptions and the model's own answer. A large PDF contract may take more space than an hour of messages.

How much fits?

As of 1 November 2026, according to Anthropic's documentation, current Claude models have a window of 1 million tokens, while earlier models have 200,000. According to Google, Gemini 4 models also have a 1 million-token window shared by the request, reasoning and answer.

These figures apply to API use. In a chat application, the available capacity depends on the application and subscription tier — check your plan's description.

A large window does not mean the model sees everything in it equally well. Anthropic says plainly that accuracy and the ability to recall a relevant detail decline as the number of tokens grows. This phenomenon is called context rot. So what matters is not just how much room the window has, but what is in it.

What happens when the window fills up?

It depends on the application.

Three outcomes of a full window: the request fails, the start silently drops out, the history is compressed into a summary
Find out which of the three outcomes your app has — that decides what to do next.

The request fails. If you send a request through an API that exceeds the window, the model returns a ‘request too long’ error.

The start of the conversation drops out. Anthropic notes that chat interfaces such as claude.ai may manage the window on a ‘first in, first out’ basis: the oldest messages stop being included in the request. The model usually does not announce that it has ‘forgotten’ the start; it simply answers without it.

The history is compressed. Another approach is compaction: when the conversation nears the limit, its earlier part is replaced with a brief summary and work continues with that summary. This keeps the conversation going, but details left out of the summary are lost.

Signs that the window is getting crowded include the model forgetting conditions set at the start, confusing document versions, asking again for something you have already told it, or answering as if it had not seen part of an attached file.

What to do: six techniques

One task, one conversation. A new topic means a new chat. Discussing an employee's holiday and reviewing a supply contract in the same thread gets in the way of both.

Carry the essentials into a new chat. When a conversation grows long, ask the model to summarise it and start a new chat with that summary:

Prompt
We have been working on this task for a long time, and I want to
continue in a new chat. Prepare a summary that lets us continue
without this conversation:

1. The goal of the task in one sentence.
2. Decisions and conditions agreed (figures, deadlines, wording) —
   only what we explicitly agreed.
3. The complete current version of the result.
4. Open questions.

Do not add anything we have not agreed. If there are contradictions
in the conversation, list them separately rather than deciding for me.

Check the summary against the conversation: if a condition from the beginning is missing, the model may already have lost it.

Send what is needed, not everything. Rather than the entire archive of correspondence with a client, attach the latest emails and the contract. Rather than an 80-page report, send the relevant section. Anthropic's engineering guide puts the principle this way: find the smallest set of genuinely useful text.

Repeat a key condition next to the request. ‘Rewrite the proposal — a reminder: prices exclude VAT and delivery takes six weeks.’ One line costs less than another round of edits.

Keep lasting information outside the chat. Put rules, templates and approved figures in a separate document and attach it to a new conversation. The article on where to put the result of work with AI explains how to make such a document from a productive conversation; another article explains how to begin a knowledge base with one question.

Work through a large document in parts. Split it into sections, process each separately and only then ask for an overall conclusion. Ask the model to identify the section each fact came from, making it easier to check that it has not invented anything.

For technical specialists

With an API, token counting shows the exact size of a request before it is sent, and actual usage is returned with each response. For long conversations and agents, Anthropic suggests server-side compaction and selective removal of old tool results. Another technique for agents is to keep records outside the window: the agent writes notes to a file or database as it works and loads them when needed. This gives it memory independent of window size.

In short

The context window is the model's working memory for one request. It can hold a great deal, but the longer it becomes, the less reliably the model notices details. Short conversations about one task, a summary when moving to a new chat and permanent rules in a separate document solve most problems for an ordinary user.

If AI in your team regularly ‘forgets’ conditions and staff spend time repeating explanations, you can examine this with Simplit in a free 30-minute meeting. Discuss your task

Finished reading? Mark the step — your path progress will update.

Path · Step 6 of 17I’m just starting with AI
0 of 17