opus → opus[1m] auto-migration skips project-level settings.json
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
The startup migration that upgrades "opus" to "opus[1m]" for plans with 1M context access only runs against userSettings (~/.claude/settings.json). It does not check or migrate projectSettings (.claude/settings.json).
This means teams that set "model": "opus" in their shared project settings silently get the 200k context variant for every session, even though every team member's plan supports 1M. The user-level setting (which may correctly be "opus[1m]" after migration) is overridden by the unmigrated project-level "opus".
In the minified source (v2.1.87), the migration function checks k6("userSettings")?.model !== "opus" and only calls J8("userSettings", ...). It never reads or writes projectSettings.
What Should Happen?
The migration should also check project-level settings (projectSettings and localSettings) for "model": "opus" and upgrade them to "opus[1m]" when the user's plan supports 1M context.
Alternatively, the "opus" shorthand should resolve to the 1M variant at runtime when the plan supports it, regardless of which settings layer it comes from — so migrations aren't needed at all.
Steps to Reproduce
- Set
"model": "opus"in.claude/settings.json(project-level) - Set
"model": "opus[1m]"in~/.claude/settings.json(user-level) — or let the migration set it - Start a session from that project directory
- Run
/context— observe 200k context window instead of 1M - Run
/model opus[1m]— context window changes to 1M
Related Issues
- #34435 —
"opus"alias not using 1M (user settings focus) - #40924 — project settings not inheriting user-level model config
Claude Model
claude-opus-4-6
Is this a regression?
No — the migration has always only targeted user settings
Claude Code Version
2.1.87
Platform
Claude.ai (Max)
Operating System
macOS (Darwin 25.3.0)
Terminal/Shell
fish
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗