Claude's Context Window: Practical Limits Nobody Tells You About
Current Claude models, including Sonnet 5 and Opus 5, accept up to a million tokens of context. That's hundreds of thousands of words, enough for a large codebase or a stack of contracts. With that much room, it's tempting to send everything on every request.
There are good reasons not to.
Limit 1: Cost grows with every request
You pay for input tokens on each request. An agent that carries 500,000 tokens of history pays for them on every turn, so after ten turns you've paid for five million input tokens. Prompt caching reduces this considerably, but only for content that stays the same at the start of the prompt.
Limit 2: Responses start later
The more input there is, the longer it takes before the first output token arrives. A response that begins almost immediately with a short prompt can take noticeably longer with a very large one, and users of interactive tools notice.
Limit 3: Accuracy can drop
Models are good at finding a single fact in a large document. Most real tasks are harder than that and require combining many details spread across the input. Irrelevant material makes that harder and can lower the quality of the answer.
Limit 4: Output has its own limit
max_tokens limits how much Claude writes in a response, regardless of how large the input is. A huge input doesn't allow a correspondingly huge answer. Long outputs need streaming and planning.
Limit 5: Rate limits count input tokens
Large requests use up input-tokens-per-minute limits quickly. A few very large requests at the same time can slow down an entire application.
Better approaches
- Retrieve: send the relevant sections rather than the whole collection.
- Cache: place stable reference material at the start of the prompt and cache it.
- Summarize: condense older parts of the conversation. Server-side compaction can do this automatically for long conversations.
- Clear: context editing can remove old tool results the agent no longer needs.
- Delegate: have subagents read large amounts of material and return summaries.
When a large context is the right choice
- A one-off analysis of a large set of documents, where the cost per request is acceptable.
- Understanding code that spans many files.
- Questions where retrieval would miss connections between distant parts of the material.
In those cases, use the full window on purpose and measure the effect on cost and quality for your own tasks.