What counts toward context
The Claude docs state that everything in the request counts toward the context window: the system prompt, messages, tool results, images, documents, tool definitions, output, and extended thinking. This is why a workflow can feel like it has plenty of room until it suddenly degrades or truncates.
The model overview lists current context and output limits by model. Several current models support 1M-token context windows, while other models are smaller. But model selection is only one part of the problem. The content you include must still be relevant, well-labeled, and not polluted by stale instructions.
Three common memory myths
A long conversation can preserve irrelevant history alongside crucial facts. That can distract the model, increase cost, and bury the active instruction. In chat products, the surface may also manage old context differently from the API. In the API, a developer has to decide what to keep, summarize, or remove.
- Myth 1: If it appeared earlier in the chat, Claude will use it correctly forever.
- Myth 2: A larger context window means the answer is automatically more accurate.
- Myth 3: A context-limit failure is the same thing as a safety refusal.
Context practice that holds up
Keep a durable facts section. Reattach primary sources when they matter. Remove obsolete instructions. Use token counting before sending large jobs. Split tasks when the output itself is large. Ask Claude to produce a short evidence table before writing long prose.
Most importantly, treat model_context_window_exceeded, truncation, and refusal as separate states. One means the response filled the available context. One means the output budget stopped the response. One means Claude declined to respond. They need different repairs.
FAQ
Does a 1M-token context window mean Claude remembers everything?
No. It means the request can include up to that token budget on supported models. Relevance, ordering, labeling, and summarization still matter.
Can context overflow look like a refusal?
To a user it can feel similar because the task fails, but in the API it is a separate stop reason and should be handled differently.
Primary sources
- Context windows Claude Platform Docs - Accessed July 6, 2026
Explains what counts toward context, current context sizes, and why long conversations still need token management.
- Models overview Claude Platform Docs - Accessed July 6, 2026
Provides current model IDs, context windows, output limits, knowledge cutoffs, and availability notes.
- What is new in Claude Sonnet 5 Claude Platform Docs - Accessed July 6, 2026
Documents behavior changes such as adaptive thinking, sampling-parameter restrictions, and tokenizer changes.
- Stop reasons and fallback Claude Platform Docs - Accessed July 6, 2026
Documents API stop reasons including refusals, truncation, tool use, and context-window overflow.