What is Context window?
A context window is the total amount of text a language model can take into account while producing a reply, counting the reply it is writing; Anthropic compares it to the model's working memory.
Also written: context length, token limit, context size
Explained
Anthropic's documentation separates the context window from the large body of data a model was trained on. The window covers everything in a request: the system prompt, each message including tool results, images and documents, tool definitions, and the output the model generates, including extended thinking. Across turns the history accumulates, and each response becomes part of the input for the next one.
The page lists sizes by model. Many current Claude models have a 1M-token window, and other models, including the deprecated Claude Sonnet 4.5, have 200k tokens. Cached prompt prefixes still count toward the window, since caching changes pricing and not whether tokens count.
A larger window is not automatically better. The page says accuracy and recall degrade as token count grows, a phenomenon it calls context rot, so choosing what goes into context matters as much as how much space exists. For long conversations it recommends server-side compaction, which summarizes earlier turns, and context editing, which can clear old tool results or thinking blocks.
If the input alone exceeds the window, the API returns a 400 error saying the prompt is too long. A token counting API can estimate usage before a request is sent. Sizes and behavior vary by model and change over time, so check the current page.
Primary source
Context windows - Claude Platform Docs (platform.claude.com), read Oct 26, 2026
This entry paraphrases the page above. Sources change; check it for the current wording.
Listings that use this
The 5 top-ranked listings tagged for Context window. Rank weighs adoption, freshness, documentation and publisher identity; how we rank and grade. Money never changes the order.
- 0.858score
context-engineering-collection
muratcankoylan
A comprehensive collection of Agent Skills for context engineering, harness engineering, multi-agent architectures, and production agent systems.
SkillAFreshness: A★ 18.2KClaude Code +9 - 0.822score
check-context
zylos-ai
Accurately check current context window and token usage.
SkillAFreshness: A★ 1.2KClaude Code +9 - 0.809score
pro
tanweai
PUA Pro extensions: self-evolution notes, compaction state continuity, KPI-style summaries, flavor switching, and feedback tools.
SkillBFreshness: B★ 19.7KClaude Code +9 - 0.773score
context-surfing
pskoett
Monitors context window health during large, long-running, multi-session, or explicitly context-sensitive work.
SkillAFreshness: A★ 320Claude Code +9 - 0.767score
strategic-compact
sangrokjung
Suggests manual context compaction at logical intervals to preserve context through task phases rather than arbitrary auto-compaction.
SkillBFreshness: B★ 863Claude Code +9
Related
Cite this page
What is Context window?. Agent Mart. https://agentmart.dev/glossary/context-window (last updated 2026-10-26)
Written Oct 26, 2026, updated Oct 26, 2026. All glossary terms