--model
A Claude Code CLI flag, read out of the shipped bundle. It has been in the build since v2.1.138, including the newest one read.
Sets the model for the current session with a model alias such as sonnet, opus, haiku, or fable, or a model's full name. Overrides the model setting and ANTHROPIC_MODEL
Anthropic's own wording. Read off CLI reference, captured 2026-09-26.
In the changelogs
14Releases whose published page names --model.
-
v2.1.302
Signed client data now stops startup when it has no entry for your model
With
--client-data-url, Claude Code now exits if the document has no entry for your model, unless--allow-other-modelsis setfound in this entry's text
-
v2.1.295
Agent SDK passes options so values starting with a dash are not misread
The Agent SDK now passes many options as
--flag=value, so a value starting with a dash is no longer mistaken for another flagfound in this entry's text, named in this entry
-
v2.1.284
--modelhelp text no longer gives an example full model nameThe help text for
--modelnow ends with "or a model's full name." and no longer shows an example full model namefound in this entry's text, named in this entry
-
v2.1.274
Model-switch suggestion text now considers config sources beyond gateway
Model-unavailable suggestions now weigh more context before recommending /model or --model
named in this entry, found in this entry's text
-
v2.1.236
ANTHROPIC_DEFAULT_MODELsets the model when nothing else doesSet ANTHROPIC_DEFAULT_MODEL and it becomes your model whenever no flag or ANTHROPIC_MODEL applies.
named in this entry, found in this entry's text
-
v2.1.234
Command-line values that look like flags or URLs are quoted safely
Values that start with a dash or look like URLs are now passed safely as --flag=value.
found in this entry's text
-
v2.1.234
Early flag scan no longer mistakes tool lists and directories for flags
Tool lists and directories passed to flags are no longer misread as flags themselves at startup.
found in this entry's text
-
v2.1.234
Spawned processes get
--flag=valuewhen the value looks like a flagPrompts and model names starting with a dash are no longer swallowed as options by subagents and background tasks.
found in this entry's text
-
v2.1.228
Relaunching Claude Code keeps your selected model
Restarting after an update keeps the model you picked instead of reverting to the default.
named in this entry, found in this entry's text
-
v2.1.228
Model selection forwarded on restart-in-place
Your selected model is passed along whenever Claude Code re-executes itself.
named in this entry, found in this entry's text
-
v2.1.207
Walnut Spire (
plugin evalGeneral Availability) [In Development]found in this entry's text
-
v2.1.200
Model ID Error Messages Now Suggest Alternatives
found in this entry's text
-
v2.1.32
Claude Opus 4.6 Support
found in this entry's text
-
v2.1.32
Model Issue Error Messages
found in this entry's text
First cited
3The earliest release whose published evidence quoted --model was v2.1.228, 11 Aug 2026. That is the oldest release this project wrote about it, so it is a floor on the name's age and not the release that introduced it. It is not a presence reading: which builds carried the name is the table below.
Presence across releases
1Build by build
149One row per release since the first build this name was read out of. Absent means the build was read and the name was not in it, never mined means no bundle for that release was ever archived, and a declared type or a default is only ever what that release's own bundle stated.
Read out of the published npm bundle release by release, and out of Anthropic's own documentation as this site captured it. Nothing on this page is a description anybody here wrote about what the CLI flag does. All CLI flags.