The model for a session now resolves from the --model flag, then the ANTHROPIC_MODEL environment variable, then ANTHROPIC_DEFAULT_MODEL, and only then the model Claude Code ships with. An organisation or a shell profile that exports the variable will see it take effect in sessions that previously fell through to the built-in default, and the model list marks the choice so you can tell where it came from.
- The model list shows the footnote "Set by ANTHROPIC_DEFAULT_MODEL" against the model the variable selected.
- The literal values
defaultandinheritare treated as unset, so resolution continues past them to the shipped default. - Startup telemetry records
ANTHROPIC_DEFAULT_MODELin its own field, separate from the existingANTHROPIC_MODELfield. - On Amazon Bedrock and Google Vertex, the check for whether Opus is available to the account is skipped whenever the variable is set.
- Sandboxed child processes spawned for bring-your-own-cloud setups have
ANTHROPIC_DEFAULT_MODELstripped from their environment, matching the existing handling ofANTHROPIC_MODEL. - Invoke it inline for a single session, for example
ANTHROPIC_DEFAULT_MODEL=claude-sonnet-4-5 claude.
Set by ANTHROPIC_DEFAULT_MODEL, t.model || process.env.ANTHROPIC_MODEL || V.ANTHROPIC_DEFAULT_MODEL
Strings lifted out of the shipped bundle, so the claim above can be checked against them.
The entry above is what we published on the day. These lines were added later, as Anthropic's own pages caught up, and they sit beside the original rather than replacing it.
| `--model <model>` | Model for the agent under test | Each case's `model`, else `ANTHROPIC_MODEL` if set, else Claude Code's default |plugins-reference see the edit
| `claude agents` | Open [agent view](/docs/en/agent-view) to monitor and dispatch parallel background sessions. Use `--cwd <path>` to show only sessions started under that directory, or `--json` to print active sessions as a JSON array fo…cli-reference see the edit
Anthropic's documentation has since written up --model, on CLI reference.
Added ANTHROPIC_DEFAULT_MODEL environment variable: sets the model new sessions start on, while a /model pick still overrides it and…
New in this build: ANTHROPIC_DEFAULT_MODEL