claude-code - 💡(How to fix) Fix [BUG] Claude Code 2.1.119 silently switches you to claude-opus-4-7[1m] even if you pick claude-opus-4-7 [1 comments, 2 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#53031Fetched 2026-04-25 06:14:14
View on GitHub
Comments
1
Participants
2
Timeline
7
Reactions
0
Timeline (top)
labeled ×6commented ×1

Error Message

Error Messages/Logs

Code Example

victor@victor:~/Documents/GanbaruAI$ claude --version
2.1.119 (Claude Code)
victor@victor:~/Documents/GanbaruAI$ echo '{"env":{"CLAUDE_CODE_EFFORT_LEVEL":"max"},"attribution":{"commit":"","pr":""},"permissions":{"defaultMode":"auto"},"enabledPlugins":{"rust-analyzer-lsp@claude-plugins-official":true},"showThinkingSummaries":true,"skipDangerousModePermissionPrompt":true,"preferredNotifChannel":"terminal_bell","skipAutoPermissionPrompt":true,"model":"claude-opus-4-7"}' > ~/.claude/settings.json
victor@victor:~/Documents/GanbaruAI$ claude --model claude-opus-4-7
 ▐▛███▜▌   Claude Code v2.1.119
▝▜█████▛▘  Opus 4.7 · Claude Max
  ▘▘ ▝▝    ~/Documents/GanbaruAI

/context
Context Usage
     ⛁ ⛁ ⛁ ⛁ ⛁ ⛀ ⛀ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶   Opus 4.7
     ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶   claude-opus-4-7
     ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶   26.1k/1m tokens (3%)
     ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶   26.1k/1m tokens (3%)
     ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶
     ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶   Estimated usage by category
     ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶   ⛁ System prompt: 9.1k tokens (0.9%)
     ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶   ⛁ System tools: 11.1k tokens (1.1%)
     ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶   ⛁ Memory files: 5k tokens (0.5%)
     ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶   ⛁ Skills: 889 tokens (0.1%)
     ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛝ ⛝ ⛝ ⛝ ⛝ ⛝ ⛝   ⛁ Messages: 13 tokens (0.0%)
Free space: 940.9k (94.1%)
Autocompact buffer: 33k tokens (3.3%)

---

"env": {
  "CLAUDE_CODE_DISABLE_1M_CONTEXT": "1"
}
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

I'm on the newest version of claude code (2.1.119) and picking claude-opus-4-7 (200k context window) in the model selector silently routes you to the claude-opus-4-7[1m] variant. This just started happening today, and no, I haven't changed anything in my settings.

settings.json

<img width="1914" height="717" alt="Image" src="https://github.com/user-attachments/assets/c8c8b6b6-a4d6-47d9-ac09-fa04234bb926" />

What Should Happen?

claude --model claude-opus-4-7 should use the 200k model (claude-opus-4-7), not claude-opus-4-7[1m].

Error Messages/Logs

victor@victor:~/Documents/GanbaruAI$ claude --version
2.1.119 (Claude Code)
victor@victor:~/Documents/GanbaruAI$ echo '{"env":{"CLAUDE_CODE_EFFORT_LEVEL":"max"},"attribution":{"commit":"","pr":""},"permissions":{"defaultMode":"auto"},"enabledPlugins":{"rust-analyzer-lsp@claude-plugins-official":true},"showThinkingSummaries":true,"skipDangerousModePermissionPrompt":true,"preferredNotifChannel":"terminal_bell","skipAutoPermissionPrompt":true,"model":"claude-opus-4-7"}' > ~/.claude/settings.json
victor@victor:~/Documents/GanbaruAI$ claude --model claude-opus-4-7
 ▐▛███▜▌   Claude Code v2.1.119
▝▜█████▛▘  Opus 4.7 · Claude Max
  ▘▘ ▝▝    ~/Documents/GanbaruAI

❯ /context
  ⎿  Context Usage
     ⛁ ⛁ ⛁ ⛁ ⛁ ⛀ ⛀ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶   Opus 4.7
     ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶   claude-opus-4-7
     ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶   26.1k/1m tokens (3%)
     ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶   26.1k/1m tokens (3%)
     ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶
     ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶   Estimated usage by category
     ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶   ⛁ System prompt: 9.1k tokens (0.9%)
     ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶   ⛁ System tools: 11.1k tokens (1.1%)
     ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶   ⛁ Memory files: 5k tokens (0.5%)
     ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶   ⛁ Skills: 889 tokens (0.1%)
     ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛝ ⛝ ⛝ ⛝ ⛝ ⛝ ⛝   ⛁ Messages: 13 tokens (0.0%)
                                               ⛶ Free space: 940.9k (94.1%)
                                               ⛝ Autocompact buffer: 33k tokens (3.3%)

Steps to Reproduce

  1. echo '{"env":{"CLAUDE_CODE_EFFORT_LEVEL":"max"},"attribution":{"commit":"","pr":""},"permissions":{"defaultMode":"auto"},"enabledPlugins":{"rust-analyzer-lsp@claude-plugins-official":true},"showThinkingSummaries":true,"skipDangerousModePermissionPrompt":true,"preferredNotifChannel":"terminal_bell","skipAutoPermissionPrompt":true,"model":"claude-opus-4-7"}' > ~/.claude/settings.json
  2. claude --model claude-opus-4-7
  3. /context

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

2.1.118

Claude Code Version

2.1.119

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

Other

Additional Information

settings.json

If you want to force the actual 200k model, add this to ~/.claude/settings.json:

"env": {
  "CLAUDE_CODE_DISABLE_1M_CONTEXT": "1"
}

P.D.: Even when I keep usage under 200k tokens on the 1M variant, it feels dumber than the 200k model. And after their April 23 postmortem admitting to three separate quality regressions in Claude Code, call me paranoid, I personally feel the 1M variant is quantized or something in the Claude Code harness behaves differently with it, That's why I'm not just setting CLAUDE_CODE_AUTO_COMPACT_WINDOW.

extent analysis

TL;DR

To fix the issue, add "CLAUDE_CODE_DISABLE_1M_CONTEXT": "1" to the env section in ~/.claude/settings.json to force the use of the 200k model.

Guidance

  • The issue seems to be related to the model selection in Claude Code, where the claude-opus-4-7 model is being silently routed to the claude-opus-4-7[1m] variant.
  • The provided workaround is to add "CLAUDE_CODE_DISABLE_1M_CONTEXT": "1" to the env section in ~/.claude/settings.json to force the use of the 200k model.
  • Verify that the fix worked by running claude --model claude-opus-4-7 and checking the context usage to ensure it's using the 200k model.
  • If the issue persists, try resetting the settings to their default values and reapply the workaround.

Example

{
  "env": {
    "CLAUDE_CODE_EFFORT_LEVEL": "max",
    "CLAUDE_CODE_DISABLE_1M_CONTEXT": "1"
  },
  ...
}

Notes

  • The issue is reported to be a regression, and the last working version was 2.1.118.
  • The user has already tried setting CLAUDE_CODE_AUTO_COMPACT_WINDOW, but it didn't resolve the issue.

Recommendation

Apply the workaround by adding "CLAUDE_CODE_DISABLE_1M_CONTEXT": "1" to the env section in ~/.claude/settings.json, as it seems to be the most straightforward solution to force the use of the 200k model.

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] Claude Code 2.1.119 silently switches you to claude-opus-4-7[1m] even if you pick claude-opus-4-7 [1 comments, 2 participants]