claude-code - 💡(How to fix) Fix [Bug] Opus model defaults to 1M context window instead of native limit [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#56080Fetched 2026-05-05 05:58:42
View on GitHub
Comments
0
Participants
1
Timeline
3
Reactions
0
Author
Participants
Timeline (top)
labeled ×3

Error Message

[{"error":"Error: 429 {"type":"error","error":{"type":"rate_limit_error","message":"Extra usage is required for long context requests."},"request_id":"req_011CahxpoZ63Mx6mHTu1a1jg"}\n at generate (/$bunfs/root/src/entrypoints/cli.js:11:55186)\n at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4943)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-05-04T17:58:56.978Z"}]

Fix Action

Fix / Workaround

Bug Description Claude Code is now defaulting to a 1M context window when using Opus, which started after a recent update. Running /model opus doesn’t resolve it. The only workaround I’ve found is setting CLAUDE_CODE_DISABLE_1M_CONTEXT=1, which feels unnecessary and inconvenient.

Code Example

[{"error":"Error: 429 {\"type\":\"error\",\"error\":{\"type\":\"rate_limit_error\",\"message\":\"Extra usage is required for long context requests.\"},\"request_id\":\"req_011CahxpoZ63Mx6mHTu1a1jg\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:55186)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4943)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-04T17:58:56.978Z"}]
RAW_BUFFERClick to expand / collapse

Bug Description Claude Code is now defaulting to a 1M context window when using Opus, which started after a recent update. Running /model opus doesn’t resolve it. The only workaround I’ve found is setting CLAUDE_CODE_DISABLE_1M_CONTEXT=1, which feels unnecessary and inconvenient.

Environment Info

  • Platform: darwin
  • Terminal: iTerm.app
  • Version: 2.1.118
  • Feedback ID: 673ac133-9756-46ef-96de-9bd670cff6fa

Errors

[{"error":"Error: 429 {\"type\":\"error\",\"error\":{\"type\":\"rate_limit_error\",\"message\":\"Extra usage is required for long context requests.\"},\"request_id\":\"req_011CahxpoZ63Mx6mHTu1a1jg\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:55186)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4943)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-05-04T17:58:56.978Z"}]

extent analysis

TL;DR

Setting the CLAUDE_CODE_DISABLE_1M_CONTEXT environment variable to 1 may temporarily resolve the issue of Claude Code defaulting to a 1M context window when using Opus.

Guidance

  • The error message indicates a rate limit error for long context requests, suggesting that the 1M context window is causing the issue.
  • Verify that setting CLAUDE_CODE_DISABLE_1M_CONTEXT=1 consistently resolves the problem to confirm the workaround.
  • Investigate the recent update that introduced this behavior to determine if it's a bug or an intended change.
  • Consider reaching out to the developers or support team for a more permanent solution or clarification on the new default behavior.

Notes

The provided workaround may not be a permanent fix, and the root cause of the issue is unclear without more information about the recent update.

Recommendation

Apply workaround: setting CLAUDE_CODE_DISABLE_1M_CONTEXT=1 appears to resolve the issue, although it may not be a convenient or permanent solution.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [Bug] Opus model defaults to 1M context window instead of native limit [1 participants]