claude --continue ignores ANTHROPIC_DEFAULT_OPUS_MODEL, resumes on 200K instead of configured 1M — wastes tokens on failed context load
Problem
When resuming a session with claude --continue, the CLI restores the model stored at session creation time instead of respecting the current ANTHROPIC_DEFAULT_OPUS_MODEL env var. If the original session was created before configuring claude-opus-4-6[1m], continuing it silently puts the user on the 200K context version.
Reproduction
- Set
ANTHROPIC_DEFAULT_OPUS_MODEL=claude-opus-4-6[1m]in~/.claude/settings.jsonenv block - Open a project that has an older session (created before this env var was set)
- Run
claude --continue→ resume full session - Hit
/model— observe option 5 "Opus 4.6 ✔" is selected (200K), NOT option 1 "Default — Opus 4.6 with 1M context" - Try to work → immediately hit "Context limit reached" because you're on 200K
Expected Behavior
--continue should either:
- Upgrade the model to match the current
ANTHROPIC_DEFAULT_OPUS_MODEL(preferred) - Or at minimum warn when the stored session model differs from the configured default
Current Behavior
--continue silently uses the stored claude-opus-4-6 (200K) model, ignoring the user's explicit configuration of claude-opus-4-6[1m] (1M). The user must manually /model → select option 1 after every --continue on older sessions.
Impact
Every --continue on a pre-1M session silently degrades to 200K context. The user configured the env var specifically to prevent this, but --continue bypasses it. This is especially confusing because new sessions correctly use 1M — only resumed sessions break.
Environment
- Claude Code v2.1.152
- macOS 24.6.0
ANTHROPIC_DEFAULT_OPUS_MODEL=claude-opus-4-6[1m]in~/.claude/settings.jsonenv block
This issue has 7 comments on GitHub. Read the full discussion on GitHub ↗