claude-code - 💡(How to fix) Fix [BUG] /model switching drops [1m] context variant for Opus 4.7 but preserves it for Sonnet 4.6

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…

Error Message

Error Messages/Logs

Fix Action

Fix / Workaround

Workaround: Use the explicit model ID with /model claude-opus-4-7[1m] instead of selecting from the picker, or set "model": "claude-opus-4-7[1m]" in ~/.claude/settings.json to make the 1M variant the persistent default.

Code Example

-
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?

The /model slash command is inconsistent in how it preserves the 1M-context variant flag ([1m]) when switching between models. Switching to Sonnet 4.6 from Opus 4.7 (1M) preserves the 1M flag. Switching back to Opus 4.7 from Sonnet 4.6 (1M) silently drops the 1M flag and lands on the base 200K-context Opus variant.

This means a session that started on claude-opus-4-7[1m] can end up on the base claude-opus-4-7 after a single round-trip through the model picker, with no warning that the available context window just shrank from 1M to 200K.

Workaround: Use the explicit model ID with /model claude-opus-4-7[1m] instead of selecting from the picker, or set "model": "claude-opus-4-7[1m]" in ~/.claude/settings.json to make the 1M variant the persistent default.

What Should Happen?

The model picker should preserve the [1m] variant flag in both directions, the same way it does when switching to Sonnet. If the variant cannot be preserved (e.g. the 1M variant of the target model isn't entitled), the picker should say so explicitly rather than silently downgrade.

Error Messages/Logs

-

Steps to Reproduce

  1. Start a Claude Code session on claude-opus-4-7[1m] (e.g. claude --model 'claude-opus-4-7[1m]')
  2. Confirm the model: status line / /model shows Opus 4.7 (1M context)
  3. Run /model and select Sonnet 4.6 from the picker
  • Output: Set model to Sonnet 4.6 (1M context) — 1M flag preserved
  1. Run /model and select Opus 4.7 from the picker
  • Output: Set model to Opus 4.7 — 1M flag dropped

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

No response

Claude Code Version

2.1.128

Platform

Anthropic API

Operating System

Other Linux

Terminal/Shell

Terminal.app (macOS)

Additional Information

No response

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