/model changes the model during a session, and your choice is also saved as the default for new sessions. You use it to run a different model for hard tasks than for simple ones.
From actually using it
In a long session where I was reworking this site, subagents first ran on the main model. Someone asked to lower the cost, so I stopped the agents in progress and relaunched them on a Sonnet model, keeping the result files that had already been saved. Later in the session I switched to Opus 5.5 with /model, and Claude Code said the choice was saved as the default and would apply to new sessions too.
How it works
Run /model with no argument and a picker opens. Give it an alias or name, as in /model sonnet, and it switches right away. The model can be set in several places. From highest to lowest precedence:
- 1. /model <alias or name> during a session
- 2. claude --model <alias or name> at startup
- 3. The ANTHROPIC_MODEL environment variable
- 4. The model field in a settings file
- 5. ANTHROPIC_DEFAULT_MODEL, the default for new sessions (v2.1.236 or later)
What gets saved
When you pick a model with /model, that choice is saved as the default for new sessions. It is written to the model field in your user settings (~/.claude/settings.json). In the picker, Enter switches and saves. The s key applies the model to this session only and leaves your default alone. Typing /model <name> directly saves, the same as Enter.
--model and ANTHROPIC_MODEL apply to that run only. Project settings and managed settings take precedence over your saved choice, so they apply again on the next run. A session you resume (--resume, --continue, /resume) normally keeps the model stored in its history.
Aliases and effort
The common aliases are sonnet (everyday coding), opus (complex reasoning), and haiku (simple tasks). Adding [1m], as in sonnet[1m] or opus[1m], gives the 1M-token context window variant. opusplan uses opus in plan mode and sonnet when executing. default clears any override and returns to your account's default.
Which version an alias points to depends on the provider and your Claude Code version. On the Anthropic API, opus is Opus 5.5, sonnet is Sonnet 5.5, and haiku is Haiku 5.5. To pin a specific version, use a full name like claude-opus-5-5, or set ANTHROPIC_DEFAULT_OPUS_MODEL and its siblings.
/effort sets how hard the model thinks. The levels are low, medium, high, xhigh, and max, and the range each model supports differs. /effort auto clears the saved value. max applies to the current session only unless you set it with an environment variable. You can also adjust effort in the /model picker with the left and right arrow keys.
/model /model sonnet /model opus[1m] /effort high claude --model opus
How it relates to subagents
Subagents inherit the session model by default. The cost docs explain that switching to Opus also applies to the subagents that inherit it. For simple subagent work, you can set model: haiku in the settings, or choose a default with the CLAUDE_CODE_SUBAGENT_MODEL environment variable.
If you hit your subscription plan's session or weekly limit, switching models with /model does not help. Those limits apply to all models. But if the message is a limit for one model family, such as "Opus limit", switching to a different family lets you keep working.
Real examples
You are doing simple wording edits and file moves, but the largest model is running by default
/model sonnet
It switches to Sonnet right away, and that choice is also saved as the default for new sessions. If you only wanted to change this session, press the s key in the picker instead.
You want a stronger model to plan a big structural change and a lighter model to write the code
/model opusplan
Opus is used in plan mode, and Sonnet is used in the execution phase after you approve the plan. You do not have to swap models by hand.
You want one deep round of reasoning without touching your session settings
Type a prompt that includes ultrathink
According to the official docs, this asks for deeper reasoning for that one turn only. The session's effort setting does not change.
Common mistakes and when not to use it
- Assuming /model applies to this session only. By default it is also saved as the default for new sessions. For a temporary switch, use the s key in the picker.
- Being surprised that a model you set with /model does not stick on the next run when project settings have a model field. Project and managed settings take precedence over your saved choice.
- Believing that changing the model fixes a usage limit. Session and weekly limits are shared across models.
- Using the largest model and high effort for every task. The cost docs say Sonnet handles most coding tasks well, and to save Opus for complex design or multi-step reasoning.
- Believing an alias is pinned to a version. Aliases point to different models depending on your Claude Code version and provider. If reproducibility matters, pin the full name.
FAQ
Does the model I set with /model carry over to the next session?
Yes. /model saves your choice as the default for new sessions. To apply it to this session only, press the s key in the picker. If project or managed settings exist, they take precedence.
Where can I see which model I am using?
If you have set up a status line, it shows there. Otherwise, /status shows it along with your account information.
What does opusplan mean?
It is an alias that uses opus in plan mode and sonnet in the execution phase.
Checked against the official docs on 2026-10-30. Sources: Claude Code docs: Model configuration, Claude Code docs: Commands, Claude Code docs: Manage costs effectively. How we write