Glossary
What is a context window?
The reason an AI "forgets" the start of a long chat or refuses a huge file, and what to do about it.
Definition
A context window is the amount of text an AI model can hold in view at once, covering your instructions, the files you share, the conversation so far and its own replies.
What it means at work
Think of it as the model’s working desk. Everything on the desk can be used; anything that falls off is gone. Windows are measured in tokens and have grown large, but they are not infinite, and quality can slip when a conversation gets very long or crammed with material. At work this shows up when a long chat starts forgetting early instructions, or when a huge contract will not fit in one go.
Numbers from the sources
- Size depends on the model: the Anthropic documentation says the context window is up to 1M tokens, depending on the model. It says other Claude models, including Claude Sonnet 4.5, have a 200k-token context window.
- Output counts against the same window. In the same documentation, a single request to the largest-window models can generate up to 128k output tokens.
- Every turn adds up. In a conversation, each user message and assistant response accumulates within the context window, which is why a long chat fills it.
- Longer inputs lower accuracy: the Claude docs from Anthropic say that as token count grows, accuracy and recall degrade, a phenomenon known as context rot.
- Position matters: Liu et al. found that performance is often highest when relevant information occurs at the beginning or end of the input context and significantly degrades when it is in the middle of long contexts.
An example
You have a 200-page report. Instead of pasting everything and asking for ‘the key points,’ you split it by section, summarize each with the same question, and then ask for a combined summary. Each step stays inside the window and is easier to check.
A common misconception
A frequent assumption is that a big window means perfect memory. Even when everything fits, the model can give some parts less attention than others. Starting a fresh chat with a short brief often beats continuing a very long one.
Sources
- Anthropic, Context windows: “up to 1M tokens, depending on the model”
- Anthropic, Context windows: “Other Claude models, including Claude Sonnet 4.5 … have a 200k-token context window”
- Anthropic, Context windows: “can generate up to 128k output tokens”
- Anthropic, Context windows: “each user message and assistant response accumulates within the context window”
- Anthropic, Context windows: “As token count grows, accuracy and recall degrade, a phenomenon known as context rot”
- arXiv, Liu et al., Lost in the Middle: How Language Models Use Long Contexts: “performance is often highest when relevant information occurs at the beginning or end of the input context … significantly degrades when models must access relevant information in the middle of long contexts”
Frequently asked
What happens when I go over the limit?
Depending on the tool, it either refuses, drops the oldest material or asks you to trim. Either way, details may be lost, so start a new chat with a summary.