Claude Code models: switch models, set effort, pin versions. Three chips read /model, /effort and opusplan on a dark background.
All articles

Claude Code models: switch models, set effort, pin versions

How to change the Claude Code model as of October 2026: aliases, /model, --model, settings, opusplan, effort levels, 1M context and pinning models for teams.

Claude Code lets you choose which Claude model answers each session, and that one setting changes a lot: how deeply the agent reasons, how fast it replies and how quickly a session uses your plan allowance. Most people never touch it and run on the default. That is fine until a hard refactor needs more depth, a long batch of small edits needs more speed, or a teammate's results differ from yours because their setup picks a different model.

VibeiDEAll your agents. One Grid.Battery friendly, no 3D. 14 days free, no card.Download

This guide covers the Claude Code model aliases, every way to switch models, which setting wins when several are set, how effort levels work, the opusplan hybrid, 1M context and how teams pin or restrict models. Everything was checked against the official model configuration docs in October 2026. Model names change often, so treat that page as the source of truth.

The Claude Code model aliases

You rarely need a full model ID. Claude Code accepts aliases that always point at the current version of a model family. As of October 2026 the docs list:

AliasWhat it does
defaultClears any override and returns to the default for your account
bestThe Fable model where it is available, otherwise the same as opus
fableFable, for the hardest and longest-running tasks
opusLatest Opus, for complex reasoning
sonnetLatest Sonnet, for daily coding tasks
haikuFast, efficient Haiku for simple tasks
opus[1m], sonnet[1m]The same models with a 1M token context window
opusplanOpus in plan mode, then Sonnet for execution

On the Anthropic API, opus, sonnet and haiku resolve to Opus 5.5, Sonnet 5.5 and Haiku 5.5 as of October 2026. Other providers such as Amazon Bedrock, Google Cloud or Microsoft Foundry can resolve the same alias to a different version, which can explain why two machines behave differently with the "same" model.

If you set nothing, the default for Pro, Max, Team, Enterprise and Anthropic API accounts is Opus 5.5, according to the same page. Microsoft Foundry defaults to Sonnet 4.5.

How to change the model in Claude Code

There are five places the model can come from. The docs rank them, highest priority first:

  1. In a session: /model sonnet, or /model alone to open the picker.
  2. At startup: claude --model opus.
  3. Environment variable: ANTHROPIC_MODEL=opus.
  4. Settings: the model field in a settings file.
  5. Default for new sessions: ANTHROPIC_DEFAULT_MODEL (Claude Code v2.1.236 or later).
Five stacked rows ranking where Claude Code reads the model from, highest priority first: /model in a session, claude --model at startup, the ANTHROPIC_MODEL environment variable, the model field in a settings file, and ANTHROPIC_DEFAULT_MODEL for new sessions.
When the model is set in several places, the highest layer wins: /model, then --model, then ANTHROPIC_MODEL, then settings, then the new-session default (as of October 2026).

The picker has one detail worth knowing. Pressing Enter switches the model and saves it as your default in ~/.claude/settings.json. Pressing s switches for the current session only. If you keep "losing" a model choice, or a quick experiment became your permanent default, this is usually why.

# one session on Opus, nothing saved
claude --model opus

# one scripted run on Sonnet
ANTHROPIC_MODEL=sonnet claude -p "Summarize the open TODOs in src/"

The --model flag and ANTHROPIC_MODEL apply only to the session you launch with them. To make a model the default for one project, put it in the project settings instead:

{
  "model": "sonnet"
}

Settings files have their own order: managed settings first, then claude --settings on the command line, then .claude/settings.local.json, then the shared .claude/settings.json, then your user file ~/.claude/settings.json. A model in a shared project file therefore beats your personal default, and your local project file beats both. See the settings docs for the full rules.

To check what is active right now, run /status. It shows the current model together with your account details. Our Claude Code commands cheat sheet lists the other slash commands and flags.

opusplan: plan with Opus, build with Sonnet

opusplan is a hybrid alias. In plan mode it uses opus for reasoning and architecture. When you leave plan mode to implement, it switches to sonnet.

Two panels: in plan mode the opusplan alias uses Opus for reasoning and architecture; after leaving plan mode a marker moves to the execution panel, where Sonnet handles implementation such as editing files and running tests.
opusplan uses Opus while you plan and switches to Sonnet when you implement. Both phases still count toward your plan.

It suits work where the hard part is deciding what to do, such as a migration plan or an unfamiliar codebase, and the implementation is mostly mechanical. It is not a way around limits: both phases still count against your plan, as described in our guide to Claude Code usage limits. If you want 1M context in both phases where the models do not use it by default, the docs offer opusplan[1m] (setting it with /model needs v2.1.265 or later).

Effort levels: the second dial

The model decides who answers. Effort decides how long it thinks first. As of October 2026, current models such as Opus 5.5, Sonnet 5.5, Haiku 5.5 and Fable support low, medium, high, xhigh and max. Older Opus 4.6 and Sonnet 4.6 support low, medium, high and max. If you ask for a level a model does not support, Claude Code uses the highest supported level at or below it.

An effort bar filling through five levels: low, medium, high, xhigh and max, with medium marked as the default on Opus 5.5, Sonnet 5.5 and Haiku 5.5. Notes show /effort high, claude --effort high and the effortLevel setting, which accepts low to xhigh but not max.
Effort is a second dial next to the model. As of October 2026 current models support low to max; the effortLevel setting stops at xhigh, and ultrathink deepens a single turn.

Set it in any of these ways:

/effort          # interactive slider
/effort high     # set directly
/effort auto     # clear the saved level for the active model
claude --effort high
export CLAUDE_CODE_EFFORT_LEVEL=high

In settings, the key is effortLevel. It accepts low, medium, high or xhigh, but not max. If you leave effort alone, the default is medium on Opus 5.5, Sonnet 5.5 and Haiku 5.5, and high on most other models.

For a single hard question, you do not need to change the setting at all: include ultrathink in the prompt to request deeper reasoning for that turn only.

A practical rule: change effort before you change model. A routine task on Opus at low can be a better trade than dropping to a smaller model, and a stubborn bug on Sonnet at high may not need Opus.

1M context and long sessions

As of October 2026, Fable, Sonnet 5 and later, Haiku 5.5, and Opus 4.7 and later have a native 1M token context window, so no suffix is needed. Opus 4.6 and Sonnet 4.6 reach 1M only through the [1m] variant, and access depends on your plan. To force a 200K window, set CLAUDE_CODE_DISABLE_1M_CONTEXT=1.

A larger window is not free attention. Long sessions still collect stale context that the model has to read on every turn. Our guide to the Claude Code context window covers /compact, /clear and when a fresh session is the better tool.

Subagents and the model they use

Subagents inherit the main conversation's model when Claude starts them, so a /model switch also changes subagents that inherit. To keep a custom subagent on a fixed model, for example a cheap haiku reviewer for lint-style checks, set model in that subagent's definition. CLAUDE_CODE_SUBAGENT_MODEL sets a default model for subagents.

Pin and restrict models for a team

Aliases move when Anthropic ships a new version. For reproducible CI runs or a team that wants the same behavior everywhere, pin the alias to a full model name with environment variables:

VariableControls
ANTHROPIC_DEFAULT_OPUS_MODELopus, and opusplan in plan mode
ANTHROPIC_DEFAULT_SONNET_MODELsonnet, and opusplan outside plan mode
ANTHROPIC_DEFAULT_HAIKU_MODELhaiku and background functionality
ANTHROPIC_DEFAULT_FABLE_MODELfable

Administrators can also limit what people can pick. In managed settings, availableModels is an allowlist of families, version prefixes or full IDs, and enforceAvailableModels: true applies it to the Default option too:

{
  "availableModels": ["sonnet", "haiku"],
  "enforceAvailableModels": true
}

One caution from the docs: ANTHROPIC_BASE_URL changes where requests go, not which model answers them.

A simple model routine

  • Routine edits, renames, tests: sonnet at low or medium.
  • Design decisions and unfamiliar code: opusplan, or opus in plan mode, then implement.
  • The hardest multi-step work: opus or best at high, with ultrathink for the one turn that needs it.
  • CI and scripts: pin with --model and the ANTHROPIC_DEFAULT_* variables so a new release does not change results silently.

If you also run Codex, the same ideas apply there with different names; see our guide to Codex models. For a weekly side-by-side of Claude and GPT models on one fixed task, see the VibeiDE model benchmark.

Where VibeiDE fits

VibeiDE is a desktop app that coordinates the Codex, Claude Code and OpenCode CLIs you already installed. Claude Code runs in an embedded terminal that shows the original CLI interface. Each user signs in to their own provider accounts, so subscriptions, usage and costs stay separate from the VibeiDE license, and each project has its own task queue with its own parallel limit per provider. See VibeiDE for Claude Code.

Takeaways

  • Use aliases (opus, sonnet, haiku, best, opusplan) and let them track the latest version, unless you need pinned results.
  • Priority, highest first: /model, --model, ANTHROPIC_MODEL, the model setting, then ANTHROPIC_DEFAULT_MODEL.
  • In the /model picker, Enter saves a new default and s changes only this session.
  • Effort is a second dial: set it with /effort, --effort or effortLevel, and use ultrathink for one hard turn.
  • Pin aliases with ANTHROPIC_DEFAULT_* variables for CI, and restrict choices with availableModels for a team.

Share this article

Post on XShare on LinkedIn

Related articles

Necessary cookies support sign-in, security, your language and this choice. Optional categories stay off until accepted.

First-party page views and acquisition measurement, plus Google Analytics 4 (Google Ireland, data may reach the US). Advertising personalization stays off.

With Analytics enabled, retain Google, Microsoft and Reddit ad click identifiers and share download, signup, activation and purchase conversions with the relevant ad provider. No personalized advertising.

Privacy · Cookie inventory