Skip to content
Agentmart
Submit a tool

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.

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