Home › Rules › Claude Code models

Claude Code models: the full list, what each alias picks, and how to switch

From Anthropic's own pages (Claude Code Model configuration, Manage costs, Settings, Subagents and Advisor docs; the Models overview and Pricing pages; two Claude Help Center articles), checked Nov 12, 2026. Sources below.

Short answer: on Anthropic's own sign-in, Claude Code's current models are Fable 5.2, Opus 5.5, Sonnet 5.5 and Haiku 5.5. You don't have to type version numbers: the aliases fable, opus, sonnet and haiku point at them, and opusplan plans with Opus and builds with Sonnet. Switch with /model inside a session or claude --model sonnet when you start one. If you never pick, Pro, Max, Ultra, Team, Enterprise and API accounts start on Opus 5.5. Fable is never the default, and on Pro it bills to usage credits. Anthropic's own advice is Sonnet for most coding, Opus when you're stuck or the change is wide, and Haiku for quick mechanical edits.

The current Claude Code models

These are Anthropic's four "latest models", with the API prices from its pricing page. If you pay for a Pro, Max or Ultra plan, you don't pay these per-token prices; they still show how heavy each model is next to the others. Claude Code's own default effort level is in the last row (more on effort below).

Fable 5.2Opus 5.5Sonnet 5.5Haiku 5.5
Anthropic says it's forDemanding reasoning and long-horizon agentic workLong-running agentic coding and knowledge workThe best combination of speed and intelligenceHigh-volume, latency-sensitive tasks
Alias in Claude Codefableopus (and best)sonnethaiku
Model IDclaude-fable-5-2claude-opus-5-5claude-sonnet-5-5claude-haiku-5-5
API price per million tokens (input / output)$8 / $40$4 / $20$2 / $10$0.10 / $0.50, or $0.50 / $2.50 when the prompt is over 100,000 tokens
Speed (Anthropic's label)ModerateModerateFastFastest
Context window1M tokens1M tokens1M tokens1M tokens
Oldest Claude Code version that runs itv2.1.321v2.1.280v2.1.284v2.1.293
Claude Code's default effortmediummediummediummedium

Older models are usually still available if you pick them by ID, for example claude-opus-5, claude-opus-4-8, claude-sonnet-5, claude-sonnet-4-6 or claude-haiku-4-5. Anthropic's Models overview lists every one with its price and retirement date. If a new model fails with "Claude Code does not support this model", your Claude Code is older than the version in the table: run claude update.

One thing to know about cost: the 4.7 and later models use a newer tokenizer that, in Anthropic's words, "produces approximately 30% more tokens for the same text". So a lower price per token on a new model doesn't mean the same text costs proportionally less.

Every model alias, and what it picks

An alias always points at the version Anthropic recommends for your provider, and it moves when a new model comes out. That's handy, but it means "sonnet" can mean a different model next month.

AliasWhat it does (Anthropic's docs)
defaultNot a model. Clears your choice and goes back to your account's default (Opus 5.5 on Anthropic accounts, see below).
bestSame model as opus. (Before v2.1.321 it picked Fable where you had Fable.)
fableFable 5.2, for "your hardest and longest-running tasks".
opusLatest Opus, for complex reasoning. Opus 5.5 today.
sonnetLatest Sonnet, for daily coding. Sonnet 5.5 today.
haikuHaiku, the fast one for simple tasks. Haiku 5.5 today.
opusplanOpus while you're in plan mode, then Sonnet when it starts building.
sonnet[1m], opus[1m]The 1M-token context version. No effect on today's Opus 5.5 and Sonnet 5.5, which already have 1M. It only matters where the alias points at an older model, like Opus 4.6 on Microsoft Foundry.

If you use Claude Code through Amazon Bedrock, Google Cloud's Agent Platform, Microsoft Foundry or Claude Platform on AWS, the aliases can point at older models. For example, Anthropic's table has sonnet as Sonnet 4.5 and haiku as Haiku 4.5 on Bedrock and Agent Platform, while opus is Opus 5.5 there. On Foundry, opus is Opus 4.6. Anthropic's advice for those providers is to pin exact versions with ANTHROPIC_DEFAULT_OPUS_MODEL, ANTHROPIC_DEFAULT_SONNET_MODEL, ANTHROPIC_DEFAULT_HAIKU_MODEL and ANTHROPIC_DEFAULT_FABLE_MODEL.

How to change the model in Claude Code

There are five ways. When more than one is set, the higher one in this list wins:

  1. In a session: /model sonnet, or /model on its own to open the picker.
  2. At startup: claude --model opus. This only lasts for that session.
  3. Environment variable: ANTHROPIC_MODEL=sonnet.
  4. Settings file: the model key in a settings.json.
  5. Default for new sessions: ANTHROPIC_DEFAULT_MODEL. It's only used when none of the above picks a model.

The catch most people hit: /model doesn't just switch, it also saves your pick as the default for every new session, by writing model to ~/.claude/settings.json. In the picker, Enter switches and saves, and s switches for this session only. You can switch mid-conversation without losing anything; Claude still sees the whole chat.

Model commands from Anthropic's docs
claude --model opus            # start a session on Opus
/model sonnet                  # switch inside a session (also saves it as your default)
/model                         # open the picker: Enter = switch + save, s = this session only
/model claude-opus-4-8         # pick an exact older version by its model ID
/model opusplan                # Opus in plan mode, Sonnet when it builds
/effort high                   # change the effort level
/status                        # see which model you're on (and your account)

To run two models at once, open two terminals and start each with its own --model. Don't use /model for that, because it changes the saved default both will read next time.

Set a model for a project (our examples)

A project's .claude/settings.json is shared with everyone who works on the repo. This one puts the team on Sonnet, falls back to Haiku if Sonnet is overloaded or unavailable, and sends subagents that don't name a model to Haiku. Claude Code only applies the env part after you trust the folder.

Our example (VibeKits): team default model, fallback and subagent model
{
  "model": "sonnet",
  "fallbackModel": ["haiku"],
  "env": {
    "CLAUDE_CODE_SUBAGENT_MODEL": "haiku"
  }
}

Want Opus for yourself without changing it for the team? Anthropic's settings docs say to put it in .claude/settings.local.json, which applies over the shared file. Claude Code keeps that file out of git when it creates it; if you make it by hand, add it to .gitignore.

Our example (VibeKits): your own model in one project
{
  "model": "opus"
}

And if you don't want the alias to move when Anthropic ships a new Sonnet, use the full ID. Anthropic's docs say every model ID from the 4.6 generation on is a fixed snapshot.

Our example (VibeKits): pin one exact version
{
  "model": "claude-sonnet-5-5"
}

More on what goes in these files: our CLAUDE.md examples cover the instructions side; the model lives in settings.json, not in CLAUDE.md.

What's the default model?

That's from v2.1.280 on. Before that, Pro and Team Standard started on Sonnet 5. On Team and Enterprise, an admin can set an organization default that replaces these. Fable is not the default on any plan or provider; you have to pick it.

So the default is Opus, but Anthropic's help center and cost guide both say Sonnet is the right pick for most coding. If you're on Pro and run out of usage quickly, that gap is worth knowing about: the help center says Opus "uses meaningfully more of your quota".

Which model for which job (Anthropic's advice)

We don't run our own model tests, so this is Anthropic's guidance from its help center and cost docs, in plain words:

The help center adds: "The /model command is always the source of truth for your account." Names and availability change, so check there before you trust any list, including this one.

opusplan: plan with Opus, build with Sonnet

/model opusplan uses Opus while you're in plan mode and switches to Sonnet once you approve the plan and Claude starts writing code. The help center calls planning "the highest-value use of Opus", and says Sonnet still sees everything Opus wrote because switching doesn't clear the chat. It's still in Anthropic's docs as of Nov 12, 2026. Both halves get the 1M context window, since today's Opus and Sonnet have it. How to use plan mode well: our plan mode guide.

Anthropic lists three other ways to mix models, from its Advisor page:

ApproachWhen the stronger model runsHow it starts
opusplanIn plan mode, then Sonnet buildsYou enter plan mode
Advisor tool (/advisor, experimental)At decision points mid-taskClaude asks the advisor when it needs help
Subagents with model setFor the whole job you hand offClaude delegates, or you call the subagent
/modelFrom your next message onYou switch

The advisor only works on the Anthropic API and Claude Platform on AWS, not Bedrock, Agent Platform or Foundry, and the advisor has to be at least as strong as your main model. Claude Code shows a notice that it "may use more tokens". Setup, the full pairing table, cost and fixes: Claude Code advisor.

Fable models and your plan

Fable 5.2, 5.1 and 5 are on every paid plan, but not the same way:

In a normal session, Claude Code asks before it bills Fable to usage credits, and after you say yes once, it stops asking. Watch out with scripts: in non-interactive mode (claude -p) Anthropic says Claude Code "never asks for consent" and bills Fable usage to credits without asking. If you put --model fable in a script on a Pro plan, that's real money.

Plan prices and limits are on our Claude Pro vs Max vs Ultra page.

Matching kit: MVP Spec-to-Build Pack ($7)

The free rules set the boundaries. The MVP pack gives you the build order: a 1-page spec to fill in first, then 7 prompts in sequence (skeleton, review, login, database, security, one feature at a time, polish), plus a "did I leak user data?" checklist.

See the MVP Spec-to-Build Pack ($7) →

Instant download. 7-day refund, no questions asked.

Effort levels: the other half of "which model"

Effort controls how much the model thinks before it answers. Lower is faster and uses fewer tokens; higher thinks harder and tests more edge cases. Change it with /effort, the left and right arrows in the /model picker, or claude --effort high.

ModelsLevelsClaude Code's default
Fable 5.2, Opus 5.5, Sonnet 5.5, Haiku 5.5low, medium, high, xhigh, maxmedium
Opus 4.7same fivexhigh
Fable 5.1 and 5, Opus 5, Sonnet 5, Opus 4.8same fivehigh
Opus 4.6, Sonnet 4.6low, medium, high, maxhigh

Context window and long sessions

All four current models have a 1M-token context window with no extra setting. Claude Code compacts (summarizes older chat) at about 967K tokens by default; run /autocompact 500k to do it sooner. On the API, the 1M window costs the normal per-token price, except Haiku 5.5, which costs five times as much per token once a prompt goes over 100,000 tokens ($0.50 / $2.50 instead of $0.10 / $0.50). To keep every session at 200K, set CLAUDE_CODE_DISABLE_1M_CONTEXT=1.

The older Opus 4.6 and Sonnet 4.6 only get 1M through their [1m] versions (/model claude-opus-4-6[1m] or /model claude-sonnet-4-6[1m]), and Anthropic's plan table says Opus 4.6 1M is included on Max, Ultra, Team and Enterprise, while Sonnet 4.6 1M needs usage credits on every plan, and Pro needs credits for both.

Models for subagents

A subagent picks its model in this order: a model Claude passes when it starts it, then the model line in the subagent's file, then CLAUDE_CODE_SUBAGENT_MODEL, then your main chat's model. That last step has a side effect Anthropic points out: switch your main chat to Opus before Claude hands off research or test runs, and those subagents run on Opus too. To keep a helper cheap, set its model in its file:

Our example (VibeKits): a test-runner subagent pinned to Haiku at low effort
---
name: test-runner
description: Runs the test suite after code changes and reports only the failures, with file and line.
tools: Read, Grep, Glob, Bash
model: haiku
effort: low
---

Run the project's test command (check package.json or the README for it).
Report only failing tests: the test name, the file and line, and the
first 10 lines of the error. If everything passes, say "All tests pass"
and nothing else. Don't edit any files.

Seven more ready-to-copy subagents, and how to force one model on all of them: Claude Code subagents examples.

When a model is busy: fallback

Set a fallback chain and Claude Code switches to the next model when the first one is overloaded or unavailable, instead of failing. For one session: claude --fallback-model sonnet,haiku. To keep it, use fallbackModel in settings (as in our example above). Anthropic's rules: up to three models, the switch lasts only for that turn, and it never kicks in for login, billing or rate-limit errors. /status doesn't show the chain, so the first sign it's set up is the notice when it switches.

Separately, Fable, Opus 5.5, Sonnet 5.5 and Opus 5 have safety checks that most often flag security and biology content. A flagged request can re-run on an older model (for example Opus 4.8 for security content), and the session stays there until you run /model again. To be asked first, run /config and set Switch models when a message is flagged to Ask each time.

Claude Code model problems: 8 things to check

  1. A new session started on a different model than you picked. You pressed s (this session only) or used --model; or a project setting, ANTHROPIC_MODEL, or an org default outranks you; or ~/.claude/settings.json isn't writable. A project or managed setting is named in the startup header.
  2. "Claude Code does not support this model". Your version is older than the model. Run claude update.
  3. "Model ... isn't recognized · did you mean ...?" A typo in the model name. Fix it where you set it.
  4. A resumed session is on an old model. --resume and --continue keep the model the chat was saved with. Run /model to change it.
  5. Fable is greyed out or says "Requires usage credits". Your plan doesn't include it (Pro, standard seats), usage credits aren't on, or your org hasn't enabled it. Free plans don't get Fable.
  6. "You've hit your Opus limit". Anthropic's docs say switching to a model outside that family with /model keeps you working. "Session limit" and "weekly limit" are shared by all models, so switching won't help there.
  7. The session moved to an older Opus on its own. A safety check flagged the request. Run /model to go back, or set Ask each time in /config.
  8. Your effort setting seems ignored. CLAUDE_CODE_EFFORT_LEVEL beats everything else, and a level the model doesn't have runs at the next one down (xhigh runs as high on Opus 4.6). Check with /effort status.

Where Anthropic's own pages disagree

Related setups

Choosing the model is one part of a Claude Code setup. The rest: CLAUDE.md for your project rules, subagents for handing off jobs, skills for step-by-step tasks, hooks for automation, and plan mode before big changes. Comparing Claude Code with other tools: Cursor vs Claude Code vs Codex and GitHub Copilot vs Cursor vs Claude Code. Need a starting rules file? The free rules generator writes one.

Next step for Claude Code: Agent Skills

Skills are folders your AI coding agent loads only when the job comes up, and Claude Code, Cursor and OpenAI Codex all read the same SKILL.md format. The Vibe Coder Skills Pack ($9) is 6 ready-to-copy SKILL.md skills (fix-one-bug, stop-the-loop, leak-check, ship-check, explain-project, builder-handoff) for Claude Code, Cursor and OpenAI Codex. Also included in the 6-kit bundle.

Get the Skills Pack for $9 on Gumroad → See what's inside

One .zip of skill folders plus one markdown file. 7-day refund, no questions asked.

Best value

All 6 kits for $29 — or $20.30 with code WELCOME30 (through Nov 30)

The right model helps, but a clear plan saves more usage than any model switch. The kits give your AI the plan for the whole project, step by step: a small game, a Discord bot, an email-triage agent, an MVP, or a cleanup of messy code.

Get all 6 kits for $29 → See what's in each kit

$29 instead of $48 for the six kits bought separately; WELCOME30 takes 30% off that at checkout ($20.30). Instant download from Gumroad. 7-day refund, no questions asked.

Related

Sources

Every model name, price, setting and version number here was checked Nov 12, 2026 on Anthropic's own docs, pricing page and help center. Prices are Anthropic's API list prices in US dollars. Anthropic changes models and aliases often, so run /model in your own Claude Code to see what your account has. If something here no longer matches, tell us at [email protected].

Free rules starter pack for Cursor, Claude Code, Codex and Antigravity

One shared AGENTS.md that works across Cursor, Claude Code, Codex, Copilot and Antigravity, plus database and test rules in each tool's format. Unzip it into your project and fill in two sections. I'll email you the link.

After that, an occasional email when I publish a new guide or rules file.

Free. No spam. Unsubscribe anytime. See our privacy note.