Claude Code 1 Million Context: Models and Plans
September 13, 2026

If you connect Claude Code straight to Anthropic, the Claude Code 1 million context window is probably already on. The catch is the exceptions: a gateway, a cloud provider, or one environment variable can hold you at 200K, and none of them makes much noise about it.
Here's where things stand as of September 2026, per Anthropic's model configuration docs:
- Models with 1M support in Claude Code: Fable 5.1, Fable 5, Sonnet 5, Opus 4.6 and later (Opus 5 included), and Sonnet 4.6.
- On by default when you connect to the Anthropic API: Fable 5.1, Fable 5, Sonnet 5, and Opus 4.7 and later.
- Sonnet 5 needs no setup. No
[1m]variant to pick, and no usage credits on any plan. - Your plan still matters for Opus and Sonnet 4.6, and on Amazon Bedrock, Google Cloud, and Microsoft Foundry the rules change again.
Haiku 4.5 isn't on the list. The models overview gives it a 200K window.
Which models get the Claude Code 1 million context window
| Model | 1M context in Claude Code | What to know |
|---|---|---|
| Fable 5.1 and Fable 5 | Yes, on by default on the Anthropic API | Some plans and seat tiers route Fable to usage credits. Fable 5.1 needs Claude Code v2.1.257 or later |
| Opus 5, Opus 4.8, Opus 4.7 | Yes, on by default on the Anthropic API | On third-party clouds, a pinned model ID needs the [1m] suffix |
| Opus 4.6 | Yes | Choose a [1m] variant. Without extended context it compacts at 200K |
| Sonnet 5 | Always 1M on the Anthropic API | No variant, no usage credits. Needs v2.1.197 or later |
| Sonnet 4.6 | Yes | Bills to usage credits on every subscription plan |
| Haiku 4.5 | No | 200K window |
What each plan covers
This table is lifted from the docs, and it only covers two models. Sonnet 5 isn't in it because it never needs usage credits.
| Plan | Opus with 1M context | Sonnet 4.6 with 1M context |
|---|---|---|
| Max, Team, and Enterprise | Included with subscription | Requires usage credits |
| Pro | Requires usage credits | Requires usage credits |
| API and pay-as-you-go | Full access | Full access |
People usually misread two rows. On Pro, Opus at 1M is billed to usage credits and doesn't come with the subscription. And Sonnet 4.6 at 1M is outside the automatic upgrade on every plan, Max included. Team seats count on both tiers: the docs say Team Standard and Team Premium both get the automatic Opus upgrade.
What about cost per token? The window carries no long-context surcharge. Claude Code's docs say 1M uses standard model pricing with no premium past 200K. Anthropic's pricing page says the same for Claude 4.6 and later models on the API, and the context windows guide notes that no beta header is needed. None of that makes a huge session cheap, though. Claude Code sends the whole conversation with every request. Even at cached rates, a one-line question late in a huge session pays for everything that came before it.
Sonnet 1M: Sonnet 5 versus Sonnet 4.6
Most "sonnet 1m" searches come down to one thing: which Sonnet you're actually running.
Sonnet 5 is the easy one. On the Anthropic API it always runs at 1M. There's no 200K variant, so the sonnet[1m] alias does nothing when sonnet already points to Sonnet 5. It auto-compacts at about 967K tokens by default, a bit before the window is full. How Claude Code auto-compact works explains how to move that threshold.
Sonnet 4.6 supports 1M too, but only as a variant you pick, and it bills to usage credits on every subscription plan.
The part that catches people is that the sonnet alias points to a different model on each provider:
| Provider | sonnet resolves to | That model's maximum window |
|---|---|---|
| Anthropic API | Sonnet 5 | 1M |
| Claude Platform on AWS | Sonnet 4.6 | 1M |
| Amazon Bedrock, Google Cloud's Agent Platform | Sonnet 4.5 | 200K |
| Microsoft Foundry | Sonnet 4.5 | 200K |
If you type sonnet on Bedrock, you get Sonnet 4.5, which has a 200K window. The docs say to add [1m] only when the underlying model supports 1M, so a suffix is no fix there. Pin Sonnet 5 by its full model ID instead. The docs say it always runs with 1M on those providers. If you're still choosing between Sonnet and Opus for the work itself, see which Claude model is best for coding.
How to select and confirm a 1M model
If your account supports 1M, the option appears in the /model picker. Restart the session if it's missing. You can also type it:
/model opus[1m]
/model sonnet[1m]
/model claude-opus-4-8[1m]
The [1m] suffix works with an alias or a full model name.
On Bedrock, Google Cloud's Agent Platform, or Foundry, you add the suffix to the pinned ID instead, for example ANTHROPIC_DEFAULT_OPUS_MODEL='claude-opus-4-8[1m]'. Claude Code strips the suffix before it sends the request. Each variable is read separately: an ID without [1m] in one variable runs at 200K even if another variable sets the same model with the suffix.
To check what you got, /status shows the current model. For a constant readout, the status line gets a context_window.context_window_size field. It's 200000 by default and 1000000 for models with extended context.
Four ways you end up at 200K without noticing
1. An LLM gateway. If ANTHROPIC_BASE_URL points at a gateway, Claude Code can't confirm 1M support, so it budgets Sonnet 5 at 200K. The fix is to pick Sonnet 5 (1M context) in the model picker, which maps to sonnet[1m]. Plan checks also work differently here. If your saved claude.ai login is still the active credential, Claude Code skips the usage-credit check entirely. The [1m] options stay in /model, and the gateway decides whether the request goes through.
2. A cloud provider with an unsuffixed ID. Opus 4.8 and Opus 5 compact at 200K when they run with a 200K window, as they do on Bedrock, Google Cloud's Agent Platform, and Foundry unless you append [1m]. So on those providers, the same Opus model compacts much earlier than it does on the Anthropic API.
3. CLAUDE_CODE_DISABLE_1M_CONTEXT=1. This one is on purpose. It's meant for deployments that need a cap. It removes the 1M variants from the picker and holds natively-1M models, Sonnet 5 and the Fable models included, to 200K:
- With auto-compaction on, sessions compact at the 200K boundary.
- Setting the auto-compact window above 200K doesn't lift the hold. Claude Code caps that window at the model's context window, and the model now counts as 200K.
- With auto-compaction off, sessions stop at 200K with a context-limit error.
If someone else set up your machine and long sessions compact far too early, check this variable first.
4. An unfamiliar model ID, for example a gateway alias. Claude Code guesses a window for that ID, and the guess can be wrong. CLAUDE_CODE_MAX_CONTEXT_TOKENS overrides the guess, but how it applies depends on how Claude Code resolves the ID. The docs' section on correcting the window for a gateway or custom model ID lists the three cases.
Do you actually need the bigger window?
Anthropic's context window walkthrough draws a useful line: do you need a larger window rather than a smaller conversation? Running out of room can mean either one.
Run /context before you decide. It breaks down what's filling your window by category. A lot of the space goes before you type anything, because CLAUDE.md, auto memory, MCP tool names, and skill descriptions all load at startup. Claude Code is one of the MCP clients we compared, and every server you connect to it adds to that startup load. Very often the fix is a smaller conversation: a /clear between tasks, or a subagent for large reads, both covered in the auto-compact guide linked above.
1M pays off when the agent really does need many files in view at once, like a refactor that spans a large codebase, or a long agentic run that piles up tool output. Our guide to coding agents explains why long sessions like these degrade.
Quick diagnosis: compacting earlier than you expect
| What you see | Likely cause | What to change |
|---|---|---|
| Sonnet 5 compacts near 200K behind a gateway | Gateway, so Claude Code budgets 200K | Pick Sonnet 5 (1M context), which maps to sonnet[1m] |
| Opus compacts at 200K on Bedrock, Google Cloud, or Foundry | Pinned ID has no [1m] suffix | Add [1m] to that ANTHROPIC_DEFAULT_*_MODEL value |
sonnet on Bedrock never goes past 200K | The alias resolves to Sonnet 4.5 | Pin Sonnet 5 by its full ID |
No 1M options in /model at all | CLAUDE_CODE_DISABLE_1M_CONTEXT=1, or your plan doesn't include it | Check the environment and the plan table above, then restart the session |
| A custom alias compacts at an odd size | Claude Code doesn't recognise the model ID | Follow the docs' rules for CLAUDE_CODE_MAX_CONTEXT_TOKENS |
Almost everything in that table is setup knowledge. One person on the team figures it out, and everyone else rediscovers it later. Taku is built to skip the rediscovery. You pick an AI setup that already works, and Taku mirrors it into a desktop workspace on your own machine and runs it, so nobody rebuilds it from a teammate's notes. Taku is in Beta, and the Mac app is available now.