Context window
The maximum number of tokens the model can read and write in one request.
The context window is the maximum number of tokens a model can handle in one request, counting both what you send and what it writes back. Everything counts: the system prompt, tool definitions, the conversation, tool results, attached files and the answer. When the window fills up, something has to be dropped, summarized or moved out.
Sizes are set per model. Anthropic’s documentation lists a 1M-token window for its current Claude models, with up to 128k output tokens per request, and 200k for older ones. A bigger window lets you send more, but more is not automatically better: quality and cost both change with length. Every token in the window is billed again on every turn of a conversation. Chroma’s Context Rot report tested 18 models and found their performance grew less reliable as input length increased, even on simple tasks.
Treat the window as a budget to spend carefully. The usual mistakes are pasting whole documents “just in case” and letting one agent session run for hours. The fixes are RAG to send only the relevant passages, compaction to summarize old turns, and subagents that do noisy work in their own window and return a short summary; a dynamic workflow applies the same split to larger jobs. The gradual quality drop before the limit has its own name: context rot.
Sources
- Claude Docs: Context windows platform.claude.com
- Chroma: Context Rot: How Increasing Input Tokens Impacts LLM Performance trychroma.com
Related terms
- Context rot: Model quality drops as the context fills with old, irrelevant or conflicting material.
- Compaction: Replacing the older part of a long conversation with a summary so the agent can keep going.
- Tokens: The pieces of text models read and write, and the unit you pay for.
- Context engineering: Deciding what goes into the model’s context, in what order and when, across a whole task.
- Subagent: A separate agent run with its own fresh context, started by a main agent for one subtask.
- Dynamic workflow: An orchestration script the agent writes at run time. A runtime executes it, starting many subagents in phases and combining their results in code.
- RAG (retrieval-augmented generation): Finding relevant documents first and putting them into the prompt, so the model answers from them.
