[BUG] settings.json "model" key ignored at session startup
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?
~/.claude/settings.json has "model": "opus" as a top-level key, but Claude Code v2.1.50 ignores it at session startup and defaults to Sonnet 4.6 (the Claude Max subscription tier default).
The banner on launch shows:
Sonnet 4.6 · Claude Max
The --model opus CLI flag works correctly — launching with claude --model opus shows Opus in the banner. So the model override mechanism works, but the settings.json "model" key is not being read during init.
Tested across two consecutive fresh sessions — same behavior both times. No project-level settings.local.json overriding it.
What Should Happen?
When "model": "opus" is set in ~/.claude/settings.json, Claude Code should launch with Opus as the active model. The startup banner should show Opus 4.6 · Claude Max instead of Sonnet 4.6 · Claude Max.
Error Messages/Logs
No error message — Claude Code launches silently with the wrong model.
Terminal session showing the bug in real time:
✻
|
▟█▙ Claude Code v2.1.50
▐▛███▜▌ Sonnet 4.6 · Claude Max
▝▜█████▛▘ ~/Documents/NS_Nascent
▘▘ ▝▝
❯ pls confirm the model in settings.json
⏺ Read 1 file (ctrl+o to expand)
⏺ Line 72: "model": "opus" — set to Opus.
Per the environment note at the top of this session, CC is running on claude-sonnet-4-6 though.
The model key in settings.json sets the model for future sessions — it takes effect when
Claude Code starts, not mid-session.
❯ so if i close and reopen claude, it'll be Opus, right?
⏺ Yes — the "model": "opus" in settings.json will load Opus 4.6 (claude-opus-4-6) on the next
session start.
❯ ok close this session and reopen
⏺ Can't close the session from within it — that's a user action. Just type /exit or close the
terminal window, then reopen Claude Code.
❯ /exit
⎿ Goodbye!
─────────────────────────────────────────────────────────────────────────────────────────────────
❯
─────────────────────────────────────────────────────────────────────────────────────────────────
⏵⏵ accept edits on (shift+tab to cycle)
Resume this session with:
claude --resume 12ce908a-dd00-4879-b0be-541b863cedf9
MikeBookAir NS_Nascent % claude
✻
|
▟█▙ Claude Code v2.1.50
▐▛███▜▌ Sonnet 4.6 · Claude Max
▝▜█████▛▘ ~/Documents/NS_Nascent
▘▘ ▝▝
❯ pls confirm the model in settings.json
⏺ Read 1 file (ctrl+o to expand)
⏺ The model is set to "opus" (line 72).
❯ /exit
⎿ Goodbye!
─────────────────────────────────────────────────────────────────────────────────────────────────
❯
─────────────────────────────────────────────────────────────────────────────────────────────────
⏵⏵ accept edits on (shift+tab to cycle)
Resume this session with:
claude --resume 6a1b1006-56c1-40de-9024-ebc700b8722c
MikeBookAir NS_Nascent % claude --model opus
✻
|
▟█▙ Claude Code v2.1.50
▐▛███▜▌ Opus 4.6 · Claude Max
▝▜█████▛▘ ~/Documents/NS_Nascent
▘▘ ▝▝
❯ hooray! when i use the command line you use the opus model like i asked :)
pls confirm the model in settings.json
⏺ Read 1 file (ctrl+o to expand)
⏺ Confirmed — line 72: "model": "opus". That's what's driving the Opus 4.6 model selection for
all CC sessions.
❯ /exit
⎿ Catch you later!
─────────────────────────────────────────────────────────────────────────────────────────────────
❯
─────────────────────────────────────────────────────────────────────────────────────────────────
⏵⏵ accept edits on (shift+tab to cycle)
Resume this session with:
claude --resume c0dcf3e5-cd0e-463d-ba04-c0c4428a523c
MikeBookAir NS_Nascent % claude
✻
|
▟█▙ Claude Code v2.1.50
▐▛███▜▌ Sonnet 4.6 · Claude Max
▝▜█████▛▘ ~/Documents/NS_Nascent
▘▘ ▝▝
❯ womp womp :(
i didn't set the --model flag so you're back to sonnet.
pls confirm model in settings.json
⏺ Read 1 file (ctrl+o to expand)
⏺ "model": "opus" is set at line 72. The session is running on Sonnet 4.6 though — that flag only
takes effect when CC is launched fresh. Mike must have started this session without it picking
up the config, or the --model flag at launch overrides it.
To confirm: settings.json has the right value. The model CC runs in a session is locked at
launch time — changing the file mid-session won't switch it. Mike would need to restart CC to
get Opus.
❯ /exit
⎿ See ya!
─────────────────────────────────────────────────────────────────────────────────────────────────
❯
─────────────────────────────────────────────────────────────────────────────────────────────────
⏵⏵ accept edits on (shift+tab to cycle)
Resume this session with:
claude --resume f6c52bfd-8b79-4272-bb2e-b72f03fd6013
MikeBookAir NS_Nascent %
Steps to Reproduce
- Add
"model": "opus"as a top-level key in~/.claude/settings.json - 2. Quit and relaunch Claude Code (
claude) - 3. Observe the startup banner — it shows
Sonnet 4.6 · Claude Maxinstead of Opus - 4. Confirm with
/model— Sonnet is active, not Opus - 5. For comparison:
claude --model opuscorrectly launches with Opus
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.50 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
Subscription: Claude Max
Relevant section of ~/.claude/settings.json:
{
"permissions": {
"defaultMode": "acceptEdits",
...
},
"model": "opus"
}
The "model" key is top-level (not nested inside permissions). The --model opus CLI flag works, which confirms the model override mechanism itself is functional — the issue is specifically that settings.json isn't being read for this key at init.
Workaround: alias claude='claude --model opus' in ~/.zshrc.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗