Skip to content
InnovateTechie
Claude Models

Claude Context Window Explained: 200K vs 1M Tokens

InnovateTechieBy InnovateTechie10 min read
Share
Claude context window sizes — 1M tokens on Claude Opus 4.8 and Sonnet 5 versus 200K on Haiku 4.5

Part ofClaude Models Explained: Opus vs Sonnet vs Haiku

Claude's context window is its working memory: 1M tokens on Opus 4.8 and Sonnet 5, 200K on Haiku 4.5. What happens when it fills up, and how to manage it.

The Claude context window is the model's working memory, measured in tokens — one token is about 0.75 English words. Claude Opus 4.8 and Claude Sonnet 5 support 1 million tokens (roughly 750,000 words), while Claude Haiku 4.5 caps at 200K. Everything counts against it: the system prompt, your files, the chat history, and Claude's own replies.

We bump into these limits weekly — multi-hour Claude Code sessions, 400-page PDF reviews, chats that quietly stop remembering decisions made an hour earlier. So this guide covers the numbers that matter: exact Claude context window sizes per model and plan, what actually eats the window, what each surface does when it's full, and the habits that keep long sessions coherent.

What is a context window in Claude?

Every request to Claude is stateless. The model doesn't "remember" your conversation between turns — the full history gets sent back and reread every single time. The Claude context window is the ceiling on that: the maximum number of tokens the model can process in one request, covering the system prompt, every prior message, attached files, tool results, and the response it's currently writing. Anthropic's context windows documentation is explicit that input and output share one budget, which is worth internalizing — a long answer consumes space exactly like a long question.

A token is a chunk of text, usually three to four characters. In English prose, one token works out to roughly 0.75 words; code, numbers, and non-English text split into more tokens per line. For scale: the article you're reading is about 2,400 tokens. A 300-page technical book is around 120,000. That's the unit the Claude token limit is denominated in, and it's why "how many pages can I paste?" always converts back to tokens first.

Claude context window sizes by model

Here's the current lineup as served through the Claude API. Claude Opus 4.8 shipped May 28, 2026, and Claude Sonnet 5 followed on June 30, 2026 — both at the full million:

ModelContext windowMax outputAPI price (per MTok in/out)
Claude Opus 4.81M tokens128K$5 / $25
Claude Opus 4.7 / 4.61M tokens128K$5 / $25
Claude Sonnet 51M tokens128K$2 / $10 intro until Aug 31, then $3 / $15
Claude Sonnet 4.61M tokens128K$3 / $15
Claude Haiku 4.5200K tokens64K$1 / $5

Those are API numbers. On claude.ai, the Claude context window you actually get depends on plan and model. The official Claude Help Center article lists 1M tokens for Claude Sonnet 5 on every paid plan — Pro at $20/month, Max 5x at $100, Max 20x at $200, plus Team and Enterprise — while recent Claude Opus and Sonnet models get 500K when chatting, and everything else defaults to 200K. Claude Code sessions reach the full 1M on newer models once usage credits are enabled. The free tier nominally has 200K too, but its message caps usually run out long before the window does.

For the full model-by-model picture — pricing levers, version naming, which tier fits which task — our pillar guide Claude Models Explained goes deeper.

Claude context window sizes compared — 1M tokens on Claude Opus 4.8 and Sonnet 5 versus 200K on Claude Haiku 4.5

What actually fills the Claude context window

People picture the window as "my messages plus Claude's answers." In practice five things share the Claude context window, and two of them are invisible in the UI:

  1. The system prompt and tool definitions. On claude.ai this is a few thousand tokens before you type a word. In Claude Code, tool schemas and loaded skill descriptions join it.
  2. Attached files. A PDF or codebase attachment is tokenized in full. One dense 100-page contract is ~50K tokens — a quarter of Haiku's entire window.
  3. The conversation history. Both sides, every turn, resent on every request.
  4. Tool results. Web searches, file reads, and command output land in the window too. In our sessions this is the silent killer — a single verbose test run can dump 10K tokens.
  5. Claude's own output. Thinking tokens and the visible reply both count, up to the 128K output cap on current models.

Run /context inside Claude Code and it shows this breakdown live. The first time we did, tool results outweighed our actual conversation three to one — which explains why sessions fill faster than the chat transcript suggests.

200K vs 1M: what the difference means in practice

Token counts are abstract, so here's the same comparison in units we actually plan work around:

Measure200K tokens1M tokens
English words~150,000~750,000
Pages~500~2,500
Novels~2~10
Code (rough)~20,000 lines~100,000 lines

So how big is the Claude context window in day-to-day terms? At 200K, Claude Haiku 4.5 comfortably holds a full audit of any single document, contract stack, or mid-sized module. The Claude 1M context on Claude Opus 4.8 and Claude Sonnet 5 is codebase-scale — a whole repository plus its docs in one request, which is exactly how we use it for cross-file refactors on this site.

Two caveats from experience. First, cost: input tokens bill per request, so genuinely filling 1M on Opus runs about $5 in input per call before any output — the math is laid out in our Anthropic Claude API pricing breakdown, and prompt caching exists precisely so repeated context costs a tenth of that. Second, reliability: a full window isn't a perfectly recalled window. Retrieval degrades toward the middle of very long contexts (researchers call it "lost in the middle," practitioners call it context rot), and the tiers differ in how gracefully they hold up — Opus degrades least, which is half the argument in our Claude Sonnet vs Opus comparison.

What happens when the Claude context window fills up

Each surface handles a full window differently, and knowing which behavior you're on saves real frustration:

SurfaceWhat happens at the limitYour move
claude.ai chatPaid plans with code execution enabled summarize earlier messages automatically; otherwise the chat stops with "Claude hit the maximum length for this conversation"Ask for a handoff summary, start fresh
Claude APIRequests exceeding the window are rejected with a validation error; long generations can stop early with a context-exceeded stop reasonTrim history, or enable server-side compaction
Claude CodeAuto-compaction summarizes older turns near the threshold and the session keeps going/context to inspect, /compact to trigger it deliberately

What happens when the Claude context window fills — chat conversation limit, API validation error, and Claude Code auto-compaction

The claude.ai behavior explains a pattern readers report constantly: Claude "forgetting" instructions from early in a long chat. Nothing malfunctioned — the summarization that keeps the conversation alive is lossy, and details that didn't make the summary are simply gone. Claude Code's compaction has the same trade-off, which is why we treat compaction as a checkpoint, not a free lunch: compact after finishing a task, not in the middle of one.

Long-context habits that actually work

After a year of running this site through Claude daily, these are the practices that survived:

  • Front-load the big stuff. Put documents and code at the top of the prompt and questions at the end. Attention to the start of the context is stronger, and stable prefixes are what prompt caching can reuse.
  • Start fresh at ~60–70%. When replies turn generic or Claude re-asks settled questions, the Claude context window is crowding out quality. Don't ride it to the hard limit — ask for a summary of decisions and open threads, then carry that into a new chat.
  • Curate instead of dumping. Ten relevant files beat a hundred marginal ones. Claude context length is a budget; spending it on noise degrades recall of the signal.
  • In Claude Code, manage deliberately. /clear between unrelated tasks, /compact at natural checkpoints, and push durable facts into CLAUDE.md so they survive resets without re-pasting.
  • On the API, cache and compact. Prompt caching makes repeated long context ~90% cheaper, and server-side compaction keeps agent loops alive past the raw Claude token limit.

None of this is exotic. The teams that struggle with long contexts usually aren't hitting model limitations — they're treating a finite window as infinite and paying for it in coherence.

Claude pricing at a glance

PlanPrice
Free$0
Pro$20 / month
Maxfrom $100 / month
APIPay per token

For the full breakdown of every plan, see our how much Claude costs guide.

Frequently Asked Questions

On paid claude.ai plans, Claude Sonnet 5 gets the full 1M-token window in both chat and Claude Code. Recent Claude Opus and Sonnet models get 500K tokens when chatting, and every other model defaults to 200K. Claude Code reaches 1M on newer models once usage credits are enabled.

It depends on the surface. The claude.ai app either summarizes earlier messages automatically or stops with a maximum-length error. The API rejects requests that exceed the model's limit. Claude Code compacts the conversation — it summarizes older turns and keeps working, so long coding sessions rarely die outright.

Two reasons. First, once a conversation nears the limit, earlier messages get summarized or dropped, so details literally leave the window. Second, recall degrades before that point: models retrieve facts from the middle of a very long context less reliably than from the start or end — often called context rot.

A token works out to roughly 0.75 English words. So a 200K-token window holds about 150,000 words — around 500 pages — and the 1M-token window on Claude Opus 4.8 and Claude Sonnet 5 holds roughly 750,000 words. Code is denser, so line counts run lower than prose equivalents.

No — current models price long context at standard per-token rates, with no premium tier. The catch is volume: input is billed on every request, so actually filling 1M tokens on Claude Opus 4.8 costs about $5 per call. Prompt caching cuts repeated context to a tenth of that.

Start a new chat — that error means the window is genuinely full. Before you do, ask Claude to write a handoff summary of decisions and open threads, then paste it into the fresh conversation. Trimming large attachments and pasting only relevant excerpts prevents the error from returning quickly.

Run /context to see exactly what's consuming tokens, /compact to summarize the session at a natural checkpoint, and /clear to reset between unrelated tasks. Claude Code also auto-compacts near the limit. Our [Claude Code CLI documentation](/claude-code-cli-documentation) guide covers all three commands in detail.
InnovateTechie

Written by

InnovateTechie

Writing about Claude and the Anthropic toolkit — models, Claude Code, pricing, features, and fixes, in clear, practical, hands-on guides tested by daily use.

View all posts →