Feature Request: Enable 1M Context Window for Claude Code

Resolved 💬 67 comments Opened Aug 12, 2025 by coygeek Closed Mar 19, 2026

Title: Feature Request: Enable 1M Context Window for Claude Code

Body

Thank you for the excellent news about the 1M token context window being available on the API. This is a welcome and powerful change.

We would like to formally request that this 1M context window capability be enabled for the claude code CLI tool.

The ability to load an entire codebase into context would be a game-changer for claude code, transforming it into an essential tool for large-scale analysis, architecture questions, and complex refactoring tasks.

Please make this feature available for claude code.

View original on GitHub ↗

67 Comments

beala · 11 months ago

Claude Code v1.0.80

> /model sonnet[1m]
  ⎿  Set model to sonnet[1m] (claude-sonnet-4-20250514[1m])
coygeek · 11 months ago

I tested this and saw:

> /model 
  ⎿  Kept model as sonnet[1m]

> read google-gemini-gemini-cli-8a5edab282632443.txt and give an executive summary of the architecture
  ⎿ API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"The long context beta 
    is not yet available for this subscription."}}

This means this new (currently undocumented) model must be used with your own API key.
Overall, good find, but not exactly what we want.

github-actions[bot] · 11 months ago

Found 2 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/5628
  2. https://github.com/anthropics/claude-code/issues/5832

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

junmediatek · 11 months ago
Claude Code v1.0.80 `` > /model sonnet[1m] ⎿  Set model to sonnet[1m] (claude-sonnet-4-20250514[1m]) ``

@beala

my claude code does not have this model, how do you make it to use?

OpenSource03 · 11 months ago
> Claude Code v1.0.80 > `` > > /model sonnet[1m] > ⎿  Set model to sonnet[1m] (claude-sonnet-4-20250514[1m]) > `` @beala my claude code does not have this model, how do you make it to use?

Either wait to gain access (they will probably send you an email once you have it), or use it over API. As I've seen on reddit, this may potentially be limited to 20x users for now.

nullswan · 11 months ago

Any model name for the sonnet + plan 1m ?

0x10sh · 10 months ago

I am 20x claude max, but I still have no access to sonnet with 1M context.

> /model sonnet[1m]
  ⎿  Set model to sonnet[1m] (claude-sonnet-4-20250514[1m])

> hi
  ⎿  API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"The long context beta is not yet available for this 
     subscription."},"request_id":"req_........"}
coygeek · 10 months ago

Cursor now supports Claude 4 Sonnet with 1M tokens of context!
Max Mode only!
https://x.com/leerob/status/1959009436485255450

Not available in CC yet.

moinulmoin · 10 months ago

lol, cc max user here, still not have access to 1M sonnet

coygeek · 10 months ago
lukalotl · 10 months ago

Really excited about this — will impact our use case a lot.

Selimonder · 10 months ago

1M context length model should be available for 5x.

silver-epsilo · 10 months ago

I have 20x subscription and still not be able to use 1M context

silver-epsilo · 9 months ago

Still not support for 20x subscription...

/model sonnet[1m]

⎿ Set model to sonnet[1m] (claude-sonnet-4-20250514[1m])

hello

⎿ API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"The long context
beta is not yet available for this subscription."},"request_id":"req_011CTSzdsakiZi58ubdKmfDY"}

/model

⎿ Set model to Default (Opus 4.1 for up to 50% of usage limits, then use Sonnet 4)

Sceleratis · 9 months ago

I am disappointed to see that despite paying $200/m Max users still don't have access to the 1m context window. I'd be perfectly fine with it consuming 2x of my quota once over 200k tokens. Not having the option at all without switching to the pay-as-you-go API route is very irritating and at that point I'd be better off cancelling my Max subscription in favor of the API. Dunno if it's even possible to use Claude Code with a mix of API & subscription, so options seem kinda limited for subscription users...

coygeek · 9 months ago
Dunno if it's even possible to use Claude Code with a mix of API & subscription, so options seem kinda limited for subscription users...

A possible workflow could be:
-Use your Max subscription for all your day-to-day coding, since that's a fixed cost.
-When you have a specific, massive task that needs the 1M context window, use the /logout command, then /login again and choose your Console (API) account.
-Run that specific task, paying for the API usage.
-Once you're done, you can /logout and log back in with your Max subscription account.

---

We (myself included) don't have access to Sonnet 1M with our subscriptions, so I agree there.

coygeek · 9 months ago

Official update from Anthropic:

We are currently limiting access "in public beta on the Claude Developer Platform for customers with Tier 4 and custom rate limits" as well as some Claude Max 20x users.

https://github.com/anthropics/claude-code/issues/8381#issuecomment-3349286446

abdul · 9 months ago

Even though I have access to sonnet 1m models via bedrock, claude-code can't go beyond 200k context. I have tried /model sonnet[1m], or /model global...sonnet[1m], and claude code shows 1M Context text (see image), context is limited to 200k. In v2.0.x, auto compact isn't working anymore.

<img width="1236" height="133" alt="Image" src="https://github.com/user-attachments/assets/21cb8ae2-87f0-407a-84f6-d499e7f421f9" />

LeoWebMarketing · 9 months ago

I have a max x20 subscription, but as of mid-October, I still don't have access to the 1 million context, even though it's critically important to me right now. I constantly encounter problems at work because of this and am ready to switch to gemini cli.

markcrandall · 9 months ago

As an x20 tier subscriber, I'd like to add my voice to this request while highlighting why this feature represents both a technical necessity and a strategic opportunity for Anthropic.

The current 200K token limit forces us into an artificial compartmentalization that mirrors the very silos we're trying to eliminate in modern software architecture. While Claude's reasoning capabilities surpass competitors, the context limitation creates an artificial ceiling on its practical utility. Engineers are pragmatists - we'll use the tool that handles our entire problem space, even if it's marginally less capable in pure reasoning. By withholding 1M context from Claude Code while offering it via API, we're forced into a suboptimal bifurcation of our toolchain.

Claude Code with 1M context would be the only terminal-based AI coding assistant capable of handling enterprise-scale codebases in a single context. This creates a defensible moat - once teams restructure their workflows around this capability, switching costs become prohibitive. GitHub Copilot, Cursor, and others are constrained to fragmented, file-by-file assistance. Claude Code could own the "whole codebase comprehension" category.

kutenai · 9 months ago

I have a personal Max subscription, and our company has a Team subscription with 6 premier licenses.
Going from 200K to 1M is a huge jump. To be honets, if Claude does this well with 200K context, it would be nice to have increemental jumps. Not just 200K -> 1M, but 200K -> 400K -> 600K, etc. I surmise that with 400K context, CC could do much better, and then 600K, etc. But it likely isn't always necessary to jump to 1M. Just some thoughts.

But, of course having 1M context would allow for introspection and refactoring, etc. of larger code bases in fewer steps.
My assumption is that with a large code base, CC, reads part into context, summizes, stores to memory (??), reads more, etc. And seems to kind of iterate over all of the code. A larger context would allow CC to do this on more code at a time, reducing the number of such loops required.

I may also be out in left field in my understading of how CC works. I'm just looking forward to the next bit jump in performance/capability of CC

advenimus · 8 months ago

WHY DO WE MAX USERS STILL NOT HAVE THIS! It's insanity!

juanpprieto · 8 months ago

Please release for Max users. Had this at my previous job and it was critical for complex tasks.

TinDang97 · 8 months ago

vote

itsmarathon · 8 months ago

How can we get the team's attention? Tweet? Or LI post? Its been 3 months and none of the subscription plans got the 1M context length?

christianvuye · 8 months ago

Would love to have 1M context on Claude Web too for projects!

SebastianAtom · 8 months ago

+1 of 1M context for subscription users

Grinsven · 8 months ago

This should really be out by now. 200k makes it hard to really do anything complex, I have to compact the chat every 5 minutes. And since Gemini 3 is coming out this month Antrophic is really going to lag behind.

OpenSource03 · 8 months ago

Also for general web conversations too. It would be great.

Selimonder · 7 months ago

I think Claude Code lost a lot of user to Cursor just because of 1M 😬

lbds137 · 7 months ago

It's frustrating how long it is taking to get this feature implemented. Gemini 3 is gonna have to eat Anthropic's lunch I guess...

etherny · 7 months ago

Use opencode to unlock 1M token ;) with same features as CC.

silver-epsilo · 7 months ago

what is opencode?

coygeek · 7 months ago

Anthropic employee confirmed its on the roadmap 3 months ago (see my earlier post), but here we are...

Also, x-ai/grok-4.1-fast has 2 Million context.

silver-epsilo · 7 months ago

yeah, I think if sonnet 1M is not stable soon, we will have to shift to use Gemini or Grok since 1M is standard for them

etherny · 7 months ago
what is opencode?

https://opencode.ai/

etherny · 7 months ago
Anthropic employee confirmed its on the roadmap 3 months ago (see my earlier post), but here we are... Also, x-ai/grok-4.1-fast has 2 Million context.

I tried Grok and Gemini, but Claude remains in my opinion the best coding model. coupled with OpenCode it's a good compromise.

silver-epsilo · 7 months ago

Ah, I see, thanks

silver-epsilo · 7 months ago

still prefer claude code since it is native for Claude

psg107 · 7 months ago

+1

bijenkins · 7 months ago

There's no reason to offer it via the API key's and not offer this in claude code. Compaction is getting out of hand. Context windows feel like 64kb ram memory all over.

TinDang97 · 7 months ago

Vote up

Ex0-l · 6 months ago

All I'm going to say.. 3 MCP servers enabled and 2 document reads later and Claude Code = Compaction.

Come on folks.

john-savepoint · 6 months ago

this absense of 1M is actually starting to grind my gears. THe products we have grown with anthropic are amazing but they just get bigger.

We just have to drop them soon if we don't get access to 1M.
My team is doing every trick we can to keep the context window low, but our workarounds which were pretty good if I might say really felt like we were absolutely maximising that 200K.... but it just isnt cutting it for where we need to go now.

spottenn · 6 months ago

I would also really benefit from the 1M context window. I love Claude Code, but compaction often loses way too much context. I may have to switch if support for 1M is not added soon. I'm a 20x Max plan user.

advenimus · 6 months ago

Cannot believe this is on roadmap for months yet not being discussed any further nor has any release happened... Love Claude Code but dang, this short context window is killing me... Please Anthropic, add a larger context window to Max users!

hobbylobbyvs · 5 months ago

I have a Teams Premium plan ($150/month, employer-provided) and a personal Max 20x plan. The 1M context window rolled out to my Teams account two weeks ago but still hasn't appeared on my personal account.
Having used the 1M context feature, going back to the standard window on my personal account feels severely limiting. Really hoping this gets extended to Max 20x subscribers soon.

explosivebit · 5 months ago

Dear developers and project managers, please tell us when you plan to add 1m context for plan x20. Please give us at least an approximate timeframe. Either we will add it or we won't, or we will add it in six months, etc.

It would be great to have some clarity =) Thank you!

silver-epsilo · 5 months ago

Forget it, it is available only for Enterprise plan

<img width="363" height="289" alt="Image" src="https://github.com/user-attachments/assets/cfd6aedc-c095-48ee-b883-d5caf965a78c" />

spottenn · 5 months ago

Could someone from @Anthropic confirm the Sonnet 1M context length models are only available on the enterprise plan? Will the 1M models not come to the Claude Max 5x or 20x plans?

yahortsaryk · 5 months ago

Please let us know what pricing plan we should upgrade to in order to use "Sonnet 4.5 with 1M of context + Deep Thinking" model in the Claude Code. I've upgraded to the Pro plan, but it looks like the model is not there. Is it available for the Enterprise plan only?

egmnklc · 5 months ago

+1 Max subscriber here, same experience:

  • Claude Code v2.1.29, Max plan
  • Can select sonnet[1m] via /model, UI confirms "Sonnet 4.5 (1M context)"
  • API rejects on first message: invalid_request_error - "The long context beta is not yet available for this subscription"
  • Switching to standard sonnet works fine

This is a UX bug — shouldn't offer options the backend rejects. Also, Max is the premium tier; 1M should be included.

intellia1 · 5 months ago

I want to share my experience in case it helps others avoid a very expensive mistake.

I was able to use Claude Sonnet with the 1M token context window via Vertex AI by configuring Claude Code to run against Vertex and enabling the sonnet[1m] model with the context-1m beta flag in my environment variables, like this:

CLAUDE_CODE_USE_VERTEX=1
CLOUD_ML_REGION=global
ANTHROPIC_VERTEX_PROJECT_ID=<YOUR-GCP-PROJECT-ID>
ANTHROPIC_MODEL=sonnet[1m]
ANTHROPIC_BETAS=context-1m-2025-08-07
VERTEX_REGION_CLAUDE_4_5_SONNET=us-east5

So, from a purely technical standpoint, yes, it "does" work.

However, after using it for only about 5 days, averaging roughly 3 hours per day, I was charged $ 1750. That level of billing is honestly insane, and I strongly recommend that no one tries this unless they are fully prepared for extreme and unpredictable costs. I completely regret having enabled it.

<img width="925" height="535" alt="Image" src="https://github.com/user-attachments/assets/b77ec511-2961-4420-bfd1-17a2949fd4c6" />

Beyond cost, the practical usability is very poor:

  • After roughly ~300k tokens, Claude Code becomes almost unusable.
  • It consumes massive amounts of RAM and CPU, the UI becomes sluggish, and responsiveness degrades badly.
  • Context quality clearly deteriorates over time (similar to what happens with very large contexts in Gemini CLI).
  • The experience becomes slow, noisy, and counterproductive rather than helpful.

In short: it is not worth it (neither technically nor economically) in its current state.
I won’t use the 1M context again unless it's included in the Max plan, and even then I'd seriously reevaluate whether it provides real value.

Overall, this was a deeply disappointing experience, both in terms of performance and cost.

egmnklc · 5 months ago
I want to share my experience in case it helps others avoid a very expensive mistake. I was able to use Claude Sonnet with the 1M token context window via Vertex AI by configuring Claude Code to run against Vertex and enabling the sonnet[1m] model with the context-1m beta flag in my environment variables, like this: CLAUDE_CODE_USE_VERTEX=1 CLOUD_ML_REGION=global ANTHROPIC_VERTEX_PROJECT_ID=<YOUR-GCP-PROJECT-ID> ANTHROPIC_MODEL=sonnet[1m] ANTHROPIC_BETAS=context-1m-2025-08-07 VERTEX_REGION_CLAUDE_4_5_SONNET=us-east5 So, from a purely technical standpoint, yes, it "does" work. However, after using it for only about 5 days, averaging roughly 3 hours per day, I was charged $ 1750. That level of billing is honestly insane, and I strongly recommend that no one tries this unless they are fully prepared for extreme and unpredictable costs. I completely regret having enabled it. <img alt="Image" width="925" height="535" src="https://private-user-images.githubusercontent.com/144287238/545535733-b77ec511-2961-4420-bfd1-17a2949fd4c6.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzAzMDI3NDMsIm5iZiI6MTc3MDMwMjQ0MywicGF0aCI6Ii8xNDQyODcyMzgvNTQ1NTM1NzMzLWI3N2VjNTExLTI5NjEtNDQyMC1iZmQxLTE3YTI5NDlmZDRjNi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYwMjA1JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MDIwNVQxNDQwNDNaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0wYjAzYmQ3ODgzMjQwMTJhYzI3NGE3NGUxYTgyODE3NmY3NzNhOGYwOTY0MTJlODI1MWZiOGZkZjcwODdlYmU1JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.fxpUsHLBScIVOv6uezBZ37glwoChKUuLiTOCqLXtQWo"> Beyond cost, the practical usability is very poor: After roughly ~300k tokens, Claude Code becomes almost unusable. It consumes massive amounts of RAM and CPU, the UI becomes sluggish, and responsiveness degrades badly. Context quality clearly deteriorates over time (similar to what happens with very large contexts in Gemini CLI). The experience becomes slow, noisy, and counterproductive rather than helpful. In short: it is not worth it (neither technically nor economically) in its current state. I won’t use the 1M context again unless it's included in the Max plan, and even then I'd seriously reevaluate whether it provides real value. Overall, this was a deeply disappointing experience, both in terms of performance and cost.

Using models with API calls can be a budget hell if you don't set your budget alerts and limits in advance, however the Sonnet 4.5 1M model was available for usage during one of my sessions, then it suddenly disappeared. Today I saw a colleague have that model available as an option under /models, but it's not available for me! Interestingly we're on the same team plan, and I have a separate Max subscription account, where I also cannot see the model.

This has to be some sort of unnocticed UX

silver-epsilo · 5 months ago

It is not just UX, it prevent API call

hi
⎿ API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"The long context beta is not yet available for this subscription."},"request_id":"req_........"}

silver-epsilo · 5 months ago

https://www.anthropic.com/news/claude-opus-4-6
Opus 4.6 features a 1M token context window in beta.

fugaku · 5 months ago

i still see

/context
Context Usage
Model: claude-opus-4-6

Tokens: 104.7k / 200k (52%)

how to enable the 1M context for claude code ?

junaidtitan · 5 months ago

Even with the 1M context window on Opus 4.6, sessions still accumulate massive bloat from progress ticks, duplicate CLAUDE.md injections, stale file reads, and metadata. Pruning this means higher efficiency and much less need to compact in the first place.

We built Cozempic, a CLI tool that prunes Claude Code JSONL session files. On a real 30MB session with 6,602 messages, the aggressive preset recovered 6.5MB (22%) by collapsing progress ticks, stripping stale file reads, deduplicating repeated document injections, and trimming oversized tool outputs.

pip install cozempic
cozempic diagnose <session_id>
cozempic treat <session_id> -rx aggressive --execute

A cleaner context window means better recall, fewer compaction cycles, and more of that 1M going to actual useful content rather than dead weight.

barnent1 · 5 months ago

We all have been patiently waiting for the 1M context. One would think that 200K is plenty. But I constantly run out even using subagents and agent teams. I'm not sure what the algo is for the compact but it certainly drops the quality exponentially. Please give us a 1M context in Claude Code. (Max 20 user).

junaidtitan · 4 months ago

export ANTHROPIC_MODEL="claude-opus-4-6[1m]"

silver-epsilo · 4 months ago

/model claude-opus-4-6[1m]
⎿ Opus 4.6 with extended context (1M) is not available on your current plan. Learn more: https://code.claude.com/docs/en/model-config#extended-context-with-1m

Dave-London · 4 months ago

Until larger context windows ship, reducing what goes into them helps. CLI tool output is a surprisingly large contributor — a verbose git log --stat can be 5,000 tokens. Pare wraps 240 dev tools in MCP servers returning structured JSON, cutting that by 40–95%.

mitar · 4 months ago

I think this issue should be closed. This is not a technical limitation but business decision. 1M context is available for API-based plans and not for discounted individual plans. API-based plans are more expensive but you get premium features like this one. If this is worth it to you, switch to API-based plan.

john-savepoint · 4 months ago

IT IS TIME TO FINALLY CLOSE THIS BLOODY TICKET WHOOP WHOOP

egmnklc · 4 months ago
IT IS TIME TO FINALLY CLOSE THIS BLOODY TICKET WHOOP WHOOP

LFGGGGGGG TIME FOR OPUSMAXXING

coygeek · 3 months ago
IT IS TIME TO FINALLY CLOSE THIS BLOODY TICKET WHOOP WHOOP

Yes, sir!

Overall, it took Anthropic 213 days, from the time they made 1M context window available via the API, to bring it to their subscription plans.

github-actions[bot] · 3 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.