The Context Window as a Shared Budget
CoreManage the context window as a shared, finite budget · Difficulty 2/5
Explanation
One Shared Budget
The Context Window is finite, and it is not reserved for any one purpose. The system prompt, tool schemas, conversation history, tool results, and retrieved documents all compete for the same budget -- every token spent on one of these categories is a token unavailable to the others. Track how full the window is rather than assuming capacity is effectively unlimited.
Prevent Context Bloat
Don't dump entire documents or full tool outputs into the window when a summary or the relevant slice suffices. Anthropic frames the goal as finding the smallest set of high-signal tokens that maximizes the odds of the desired outcome -- curation, not raw capacity, is what drives quality.
Common exam traps
- **"Just use the biggest Context Window and stuff everything in."** Bloated context causes context rot and higher cost; curation beats capacity, no matter how large the window is.
Key Takeaways
- The context window is a single shared budget across system prompt, tool schemas, history, tool results, and retrieved docs
- Track how full the window is rather than assuming capacity is unlimited
- The goal is the smallest set of high-signal tokens that maximizes the odds of the desired outcome
- A bigger window is not a substitute for curation
Glossary Terms
The maximum amount of text (measured in tokens) that Claude can process in a single request. Includes both input tokens (prompt, history, tool results) and output tokens. Exceeding the context window causes an error or requires context management strategies.
The fundamental unit of text processing for Claude. Roughly 3-4 characters or about 0.75 words in English. Used for measuring input, output, and context window size. Costs are calculated per input and output token.
Related Concepts