Home › Rules › Claude Code models
Claude Code models: the full list, what each alias picks, and how to switch
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.2 | Opus 5.5 | Sonnet 5.5 | Haiku 5.5 | |
|---|---|---|---|---|
| Anthropic says it's for | Demanding reasoning and long-horizon agentic work | Long-running agentic coding and knowledge work | The best combination of speed and intelligence | High-volume, latency-sensitive tasks |
| Alias in Claude Code | fable | opus (and best) | sonnet | haiku |
| Model ID | claude-fable-5-2 | claude-opus-5-5 | claude-sonnet-5-5 | claude-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) | Moderate | Moderate | Fast | Fastest |
| Context window | 1M tokens | 1M tokens | 1M tokens | 1M tokens |
| Oldest Claude Code version that runs it | v2.1.321 | v2.1.280 | v2.1.284 | v2.1.293 |
| Claude Code's default effort | medium | medium | medium | medium |
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.
| Alias | What it does (Anthropic's docs) |
|---|---|
default | Not a model. Clears your choice and goes back to your account's default (Opus 5.5 on Anthropic accounts, see below). |
best | Same model as opus. (Before v2.1.321 it picked Fable where you had Fable.) |
fable | Fable 5.2, for "your hardest and longest-running tasks". |
opus | Latest Opus, for complex reasoning. Opus 5.5 today. |
sonnet | Latest Sonnet, for daily coding. Sonnet 5.5 today. |
haiku | Haiku, the fast one for simple tasks. Haiku 5.5 today. |
opusplan | Opus 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:
- In a session:
/model sonnet, or/modelon its own to open the picker. - At startup:
claude --model opus. This only lasts for that session. - Environment variable:
ANTHROPIC_MODEL=sonnet. - Settings file: the
modelkey in asettings.json. - 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.
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)
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.
Free. No spam. Unsubscribe anytime. See our privacy note.
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.
{
"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.
{
"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.
{
"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?
- Pro, Max, Ultra, Team, Enterprise and the Anthropic API: Opus 5.5.
- Claude Platform on AWS, Amazon Bedrock and Google Cloud's Agent Platform: Opus 5.5.
- Microsoft Foundry: Sonnet 4.5.
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:
- Sonnet for most coding: features, tests, known bugs, refactors. Anthropic's cost guide: "Sonnet handles most coding tasks well and costs less than Opus." At API prices, Opus 5.5 costs twice what Sonnet 5.5 does per token.
- Opus when you're really stuck or the change touches many files: hard debugging, cross-cutting refactors, architecture decisions.
- Haiku for quick mechanical work: renames, log lines, regex explanations, boilerplate, and high-volume scripted runs.
- Fable for work bigger than one sitting. Anthropic's tips: describe the outcome rather than the steps, give it messy problems like finding the root cause of an outage, and skip the "remember to test" reminders, since it checks its own work more.
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:
| Approach | When the stronger model runs | How it starts |
|---|---|---|
opusplan | In plan mode, then Sonnet builds | You enter plan mode |
Advisor tool (/advisor, experimental) | At decision points mid-task | Claude asks the advisor when it needs help |
Subagents with model set | For the whole job you hand off | Claude delegates, or you call the subagent |
/model | From your next message on | You 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:
- Max, Ultra, and premium seats on Team and seat-based Enterprise: included. You can spend up to 50% of your weekly limit on Fable, and it uses that limit faster than other models. After that, keep going on usage credits or switch models.
- Pro, and standard seats on Team and seat-based Enterprise: not included. Fable runs on usage credits (pay-as-you-go) from the first message. The
/modelpicker shows "Requires usage credits" on the Fable row. - Free plan: no Fable.
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.
| Models | Levels | Claude Code's default |
|---|---|---|
| Fable 5.2, Opus 5.5, Sonnet 5.5, Haiku 5.5 | low, medium, high, xhigh, max | medium |
| Opus 4.7 | same five | xhigh |
| Fable 5.1 and 5, Opus 5, Sonnet 5, Opus 4.8 | same five | high |
| Opus 4.6, Sonnet 4.6 | low, medium, high, max | high |
- Anthropic's guide to levels:
lowfor quick back-and-forth like a rename;mediumfor everyday work with a clear scope;highwhen edge cases matter, like fixing a bug in old code;xhighfor deeper reasoning;maxfor hard problems you want Claude to grind on alone. Anthropic warnsmax"is prone to overthinking", and Claude Code only applies it to the current session. - One hard turn: type
ultrathinkanywhere in a prompt. It asks for deeper thinking on that turn without changing your setting. "Think hard" and similar phrases are just normal words to Claude Code. Every level, ultrathink vs ultracode, and how to save or cap a level: Claude Code effort levels. - Thinking can't be switched off on Opus 5.5, Sonnet 5.5, Haiku 5.5 or the Fable models. The model decides how much to think, and effort is your control. You're charged for thinking tokens even when they're hidden.
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:
---
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
- 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.jsonisn't writable. A project or managed setting is named in the startup header. - "Claude Code does not support this model". Your version is older than the model. Run
claude update. - "Model ... isn't recognized · did you mean ...?" A typo in the model name. Fix it where you set it.
- A resumed session is on an old model.
--resumeand--continuekeep the model the chat was saved with. Run/modelto change it. - 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.
- "You've hit your Opus limit". Anthropic's docs say switching to a model outside that family with
/modelkeeps you working. "Session limit" and "weekly limit" are shared by all models, so switching won't help there. - The session moved to an older Opus on its own. A safety check flagged the request. Run
/modelto go back, or set Ask each time in/config. - Your effort setting seems ignored.
CLAUDE_CODE_EFFORT_LEVELbeats everything else, and a level the model doesn't have runs at the next one down (xhighruns ashighon Opus 4.6). Check with/effort status.
Where Anthropic's own pages disagree
- Default effort. The Models overview lists Fable 5.2 and Sonnet 5.5 at
highby default; Claude Code's Model configuration page says both start atmedium. Both can be true: the overview is the API's default, and Claude Code sends its own. In Claude Code, expectmedium. - "Extended thinking" on the new models. The Manage costs page says Opus 5.5, Sonnet 5.5, Haiku 5.5 and Fable "always use extended thinking". The Models overview says extended thinking is "not accepted on later models", which use adaptive thinking instead, and the Model configuration page agrees. What matters for you: you can't turn thinking off on those models, and effort is the control.
- Can Sonnet 5.5's thinking be turned off? The overview table marks Opus 5.5 and Fable 5.2 as "Adaptive (always on)" but Sonnet 5.5 and Haiku 5.5 as just "Adaptive". The same page says the API rejects turning thinking off on Sonnet 5.5, and Claude Code's docs say you can't turn it off on either. Treat both as always on.
- Fable 5.1's minimum version. Claude Code's docs say v2.1.257; the help center says v2.1.255. Run
claude updateand you're past both. - Checking your spend. The help center says
/costshows API spend; the Claude Code cost docs describe/usagefor that, and don't mention/cost. Try/usagefirst. Reading the limit bars and the Opus or Sonnet limit messages is covered in Claude Code usage limits.
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
- Claude Pro vs Max vs Ultra (which plan for Claude Code)
- Claude Code usage limits and rate limits (limit messages, resets, /usage, auto-continue, 429s)
- Plan mode guide (6 tools + 6 plan prompts)
- Claude Code effort levels (low to max, ultrathink vs ultracode)
- Claude Code advisor (/advisor, which model can advise which, cost)
- Claude Code subagents examples (7 copy-paste subagents)
- CLAUDE.md examples (copy-paste template)
- Claude Code skills examples (7 copy-paste SKILL.md files)
- Claude Code hooks examples (7 copy-paste hooks)
- Cursor vs Claude Code vs Codex for beginners (real prices)
- GitHub Copilot vs Cursor vs Claude Code (real prices)
- Free rules file generator
Sources
- Claude Code docs: Model configuration
- Claude Code docs: Manage costs effectively
- Claude Code docs: Settings
- Claude Code docs: Subagents (choose a model)
- Claude Code docs: Advisor tool
- Claude docs: Models overview
- Claude docs: Pricing
- Claude Help Center: Models, usage, and limits in Claude Code
- Claude Help Center: Claude Fable models on your plan
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].