Context Window
Also: context length, token limit
The context window is how much text Claude can hold in its attention at once — your conversation history, any documents you've shared, system instructions, and Claude's own responses. Once you hit the limit, older content gets pushed out. Claude Fable 5, Claude Opus 5 and Claude Sonnet 5 each have a 1,000,000-token context window, roughly 555,000 words; Claude Haiku 4.5 has 200,000. Long contexts let Claude analyse full document sets or maintain long conversations — but they also cost more on every turn, and can dilute Claude's focus on the material that actually matters.
In practice
You paste a 200-page document into Claude and it reads the whole thing, using a fraction of the window. You paste an entire document repository and you will eventually find the edge. The practical question stopped being "will it fit" and became "does including this help" — a smaller context holding the right material reliably beats a large one full of noise.
Related concepts
Where Context Window shows up
6 articlesThe context window shapes what Claude can and can't do in any given conversation. Here is how to work with it.
Persistent memory for chatbots is not a Claude feature — it is an architecture decision. Here is how to build it correctly.
In-memory arrays disappear on page reload. How to persist conversation history to Supabase, load it back on session resume, and prune context intelligently.
A million tokens sounds like more room than anyone could use. In practice, how you use that space — not whether you run out of it — is what changes the quality of your outputs.
Context window is the single number that shapes everything about how Claude thinks with you — and most people are using only a fraction of it.
On September 14, 2026 the Messages API gained a `compaction` parameter (beta header `compact-2026-09-04`). You send the conversation, get back one signed summary block, and swap it in for the messages it covers. That makes background compaction and keep-the-last-few-turns compaction possible. Here is the request shape, the swap logic, and the five ways it quietly fails.