What is a context window?
Everything a model can see at once while it writes an answer, counted in tokens. When the window is full, something has to be left out.
beginner · Also called Context Length
A model has no memory of you between messages. Each time it answers, it reads one long piece of text from the top: the instructions from whoever built the app, the conversation so far, any files you attached, and the results of any tools it used. That piece of text is the context, and the most it can hold is the context window.
The window is measured in tokensTokenThe small piece of text a language model reads and writes, often part of a word. Prices, limits and the context window are all counted in tokens., the pieces of words a model reads. For Claude a token is about 3.5 characters of English, so 1,000 tokens is about 3,500 characters, a page or two of a paperback. The largest Claude models hold 1 million tokens. Other makers publish their own limits on their model pages.
What happens when it fills up
Something has to go. A chat app may quietly drop or summarise the oldest messages, which is why a long conversation can "forget" a detail you gave it at the start. An agent that works for a long time does this on purpose. Compaction replaces older turns with a summary. Context editing clears out old tool results that are no longer needed. What must last goes outside the window, into files or a memory tool the model can read back later.
Bigger is not automatically better
A model does not read a full window as well as a short one. As the token count grows, accuracy and recall get worse. Anthropic calls this context rot. A long document can hold the answer and the model can still miss it, so a short, relevant context usually beats a long, complete one.
Why it shows up on your bill
Every turn sends the whole context again. Anthropic's example is a task that grows from 20,000 to 120,000 tokens over 40 turns: the conversation never passes 120,000, but the bill counts about 2.8 million input tokens. Caching makes the repeated part cheaper to read. It does not make the window any less full.
What to do with this
Start a new chat when you change subject. Paste the part of a document that matters, not the whole folder. And when an answer ignores something you said long ago, assume it fell out of view before you assume the model is careless.
Sources
Where each fact comes from
This page was last checked against these sources on 14 October 2026.
- 1Context windows
Anthropic, Claude API documentation · 25 September 2026
The context window is the model's working memory, and the question, instructions, tool definitions and tool results all count toward it. The largest Claude models hold 1 million tokens. As the token count grows, accuracy and recall get worse, which is called context rot. Compaction summarises older turns and context editing clears old tool results.
- 2Glossary
Anthropic, Claude API documentation · 25 September 2026
A language model generates text one token at a time, and a token is about 3.5 characters for Claude.
- 3What a task costs on Opus 5.5
Anthropic · 25 September 2026
A task that grows from 20,000 to 120,000 tokens over 40 turns processes about 2.8 million input tokens, though the conversation never grows past 120,000. Each turn sends the conversation so far.
- 4Prompt caching
Anthropic, Claude API documentation · 25 September 2026
Text the model has already processed can be read again at a much lower price.
- 5Memory tool
Anthropic, Claude API documentation · 25 September 2026
What must last is stored outside the context window, in files the model can read back in a later conversation.