Set a default model for both the Claude Code CLI and the VS Code extension. They share the same global config, so one change covers both.
Add a model key to your global user settings at ~/.claude/settings.json:
{
"model": "claude-opus-4-6[1m]"
}The [1m] suffix selects the 1-million-token context variant of Opus 4.6.
-
Open (or create)
~/.claude/settings.json. -
Add the
modelkey, merging with whatever is already there — don't overwrite the file. Example of a file that already had other settings:{ "model": "claude-opus-4-6[1m]", "skipDangerousModePermissionPrompt": true, "enabledPlugins": { "warp@claude-code-warp": true } } -
Start a new session (restart the CLI, or reload the VS Code window). Already-open sessions won't switch mid-session.
-
Verify with
/modelin a fresh session — it should show Opus 4.6 (1M) as active.
The CLI and the VS Code extension run the same Claude Code core and both read ~/.claude/settings.json. Setting the model there makes it the default everywhere.
Settings load in order user → project → local → flag, where later wins. So this global default is overridden by:
- A project's
.claude/settings.jsonor.claude/settings.local.jsonwith its ownmodel. - A
--modelflag on the CLI. - A manual pick via
/model(CLI) or the VS Code model picker — that choice can take precedence for that session.
If /model doesn't show the expected model, check those higher-precedence sources.
/configinside Claude Code — interactive settings UI.claude --model "claude-opus-4-6[1m]"— one-off per invocation.