CLClaude Lessons Try the free lessons

Claude Lessons / Guides

Which Claude Model Should You Use in Claude Code?

Most advice on this question is a benchmark table and a shrug. The actual decision has four dials, not one: which model, which effort level, whether you're paying for latency with fast mode, and whether a stronger model should be consulted at decision points instead of running the whole task. Getting the combination right matters more than getting the model right — a Sonnet 5 session at high effort with an Opus advisor often beats an Opus session you couldn't afford to run for as long. This guide covers what each model in Claude Code is genuinely for as of September 2026, how effort actually behaves (including the parts that differ per model), the two cost traps that catch people, and how to route different models to different jobs inside one session.

Illustration of one task routed along several different paths

The short answer

If you want one paragraph and no further reading:

Leave the default alone for a week and see what annoys you. Pro and Team Standard start on Sonnet 5; Max, Team Premium, Enterprise, and the Anthropic API start on Opus 5. Both run at high effort and both have a 1M-token context window. If the annoyance is "it missed something a careful engineer wouldn't", move up a model or to xhigh effort. If it's "I'm waiting", that's fast mode, not a model change. If it's "I'm burning my limits", move routine work down to Sonnet or route your subagents to a smaller model. Those are three different problems, and picking a bigger model only solves the first one.

The rest of this guide is the detail behind that, plus the things that aren't obvious: effort levels are not the same scale across models, switching mid-session throws away your prompt cache, and Fable is not simply "the best one."

The lineup: what each model is actually for

Four current models matter in Claude Code. (Several older ones — Opus 4.8, 4.7, 4.6, 4.5, Sonnet 4.6, 4.5, Fable 5 — remain available and selectable by ID, which matters mainly if your organization pins a version.)

Model Positioned for Context / max output Effort support List price per MTok in / out
Claude Fable 5.1 Demanding reasoning and long-horizon agentic work 1M / 128K All five levels $10 / $50
Claude Opus 5 Complex agentic coding and enterprise work 1M / 128K All five levels $5 / $25
Claude Sonnet 5 The best combination of speed and intelligence 1M / 128K All five levels $2 / $10
Claude Haiku 4.5 The fastest model, for simple tasks 200K / 64K None $1 / $5

How to read that in practice:

Three things about Fable specifically that people discover the hard way:

One cross-version gotcha on token counts. Claude 4.7 and later models use a newer tokenizer that produces roughly 30% more tokens for the same text. If you're comparing a session's token count against numbers you recorded on an older model, you are not comparing like with like. That alone explains a lot of "my usage exploded" reports after an upgrade — see the token usage and costs guide.

Aliases, and what they really resolve to

You rarely type a full model ID. Claude Code takes aliases, and knowing what each one means saves a surprise:

AliasWhat it does
defaultClears any model override and reverts to your account's runtime default. Not itself a model
bestThe Fable model where Fable is available to you, otherwise the same model as opus
fableThe Fable model for your provider, for your hardest and longest-running tasks
opusThe latest Opus, for complex reasoning
sonnetThe latest Sonnet, for daily coding
haikuThe fast, efficient Haiku, for simple tasks
opusplanOpus while plan mode is active, then Sonnet for execution
sonnet[1m] / opus[1m]Forces the 1M-token context variant. No effect when sonnet already resolves to Sonnet 5, which has a native 1M window

The trap is that opus and sonnet mean different models on different providers. This catches teams comparing notes across a mixed deployment:

Provideropus resolves tosonnet resolves to
Anthropic APIOpus 5Sonnet 5
Claude Platform on AWSOpus 5Sonnet 4.6
Amazon Bedrock, Google Cloud's Agent PlatformOpus 5Sonnet 4.5
Microsoft FoundryOpus 4.6Sonnet 4.5

So "we're both on Sonnet" can mean Sonnet 5 with a 1M window and xhigh effort for one person, and Sonnet 4.5 for the other. If you're standardizing across a team, pin full model IDs rather than aliases — the Claude Code for teams guide covers where those settings live. Check what you're actually on with /status or the status line.

Version floors, since aliases silently resolve to older models on older clients: Opus 5 requires Claude Code v2.1.219 or later, Sonnet 5 requires v2.1.197, Opus 4.8 requires v2.1.154, and Fable 5.1 requires v2.1.257.

What your plan starts you on

Plan or providerDefault model
Max, Team Premium, Enterprise, Anthropic APIOpus 5
Pro, Team StandardSonnet 5
Claude Platform on AWS, Amazon Bedrock, Google Cloud's Agent PlatformOpus 5
Microsoft FoundrySonnet 4.5

An administrator can replace the account-type default with an organization default model, and ANTHROPIC_DEFAULT_MODEL can too. Fable is never the account-type default anywhere.

Effort: the dial most people never touch

Effort decides how much the model spends on your task — and it affects all tokens in the response, not just thinking: text, explanations, tool calls, and function arguments. Lower effort means fewer and terser tool calls, which is why a low-effort session sometimes feels less thorough rather than merely faster. It's a behavioral signal, not a hard token budget.

LevelWhen to use it
lowShort, scoped, latency-sensitive tasks that aren't intelligence-sensitive
mediumCost-sensitive work that can trade off some intelligence
highBalances token usage and intelligence. The default on every model except Opus 4.7
xhighDeeper reasoning at higher token spend. Typical use: long agentic and coding tasks over 30 minutes with token budgets in the millions
maxDeepest reasoning. Can improve performance on demanding tasks but shows diminishing returns and is prone to overthinking. Test before adopting broadly

Support differs by model, and this is where people get wrong results:

ModelLevels available
Fable 5.1, Fable 5, Opus 5, Sonnet 5, Opus 4.8, Opus 4.7low, medium, high, xhigh, max
Opus 4.6, Sonnet 4.6low, medium, high, maxno xhigh
Haiku 4.5Effort is not supported at all

Set a level the active model doesn't support and Claude Code silently falls back to the highest supported level at or below it — xhigh runs as high on Opus 4.6. Nothing errors. If you've configured xhigh org-wide and half your team is on Bedrock resolving sonnet to Sonnet 4.5, some of them are quietly running at a different level than you think.

The scale is calibrated per model. high on Sonnet 5 and high on Opus 5 do not represent the same underlying value. Don't reason about effort as a portable number.

Setting it:

# interactive slider
/effort

# set directly
/effort xhigh

# clear your saved level for the active model
/effort auto

# one session
claude --effort xhigh

In the interactive slider (and in the /model picker, where left/right arrows adjust effort), Enter saves the level as your default for that model and s applies it to this session only — the session-only option requires v2.1.257 or later. Saved levels are stored per model.

In settings, per model or as a blanket default:

{
  "modelSettings": {
    "claude-opus-5": {
      "effortLevel": "medium"
    }
  }
}
{
  "effortLevel": "xhigh"
}

modelSettings requires v2.1.251 or later; before that, /effort wrote the top-level effortLevel key. Neither key accepts maxmax applies to the current session only unless you set it through the CLAUDE_CODE_EFFORT_LEVEL environment variable. There's also a maxEffortLevel cap (v2.1.267+), and Enterprise organizations can set effort limits per role and per model; when both apply, the lower cap wins, and naming a higher level just runs at the cap.

The "hold" that makes effort look broken. On Fable 5, Opus 4.8, and Opus 4.7, Claude Code holds that model's default effort across sessions from the first time you run it, even when your settings resolve a different level. Confirming a level interactively ends the hold; passing --effort at launch or pressing s leaves it in place. Opus 5 and Fable 5.1 have no such hold. In a non-interactive -p run, /effort reports Not applied while a hold is active — pass --effort at launch instead.

ultracode, ultrathink, and max

Three things that sound like the same feature and aren't:

Related, and often confused with effort: Fable models, Sonnet 5, and Opus 4.7 and later always use adaptive reasoning — there's no fixed thinking budget to configure, and you can't turn thinking off on Fable models at all.

Model choice is a habit, not a setting

Claude Lessons has free interactive lessons on the judgment side of this: scoping a task to the smallest useful step, planning before editing, and verifying output instead of trusting it — practiced in a simulated Claude Code workspace with instant feedback.

Start the free interactive lessons

Fast mode: buying latency, not intelligence

Fast mode is the most misunderstood option in the list, because the name suggests a tradeoff that doesn't exist. It is not a different model and not a lower effort level: it runs Claude Opus with a different API configuration that prioritizes speed over cost efficiency, up to 2.5x faster, with identical quality and capabilities. You pay for it in money, not accuracy.

Fast modeLower effort level
QualitySame model qualityPotentially lower on complex tasks
LatencyLowerLower
CostHigher per tokenLower

The specifics:

Use it for rapid iteration, live debugging, and deadline work. Don't use it for long autonomous tasks, batch processing, CI pipelines, or anything cost-sensitive — paying a premium for speed while nobody is watching the cursor is pure waste. Fast mode is in research preview, so pricing and availability may change.

The advisor: a stronger second opinion

The advisor tool is the option that changes the shape of the decision, and almost nobody knows it exists. Instead of running your whole task on an expensive model, you run it on a cheaper one and let Claude consult a stronger model at key moments: before committing to an approach, when an error keeps recurring, before declaring a task done. The advisor receives the full conversation — every tool call and result — and returns guidance that Claude applies before continuing.

/advisor opus
{
  "advisorModel": "opus"
}

You can also launch with claude --advisor opus for a single session (the flag isn't listed in claude --help). Accepted values are fable, opus, sonnet, or a full model ID.

The advisor must be at least as capable as the main model, and the pairings are enforced:

Main modelAccepted advisors
Haiku 4.5Fable, Opus, Sonnet — Haiku can call an advisor but can't be one
Sonnet 5Fable, Opus, Sonnet 5 (a Sonnet 4.6 advisor is rejected)
Opus 4.7 or laterFable, and Opus 4.7 or later
Fable 5.1 or Fable 5Fable 5.1, or the same Fable version. Opus and Sonnet advisors are rejected

Claude decides when to call it — the timing is model-driven, there's no setting to cap or force calls, but you can ask in your prompt ("consult the advisor before you continue"). In session you'll see an Advising line and then either Reviewed (press Ctrl+O to read the guidance) or Declined.

The economics are the point: because Claude calls the advisor at decision points rather than every turn, pairing a faster main model with a stronger advisor typically costs less than running the stronger model throughout. Two caveats. Advisor tokens bill at the advisor model's rates, and the advisor's read of the conversation is not cached — each call processes the full transcript anew with no reuse between calls, so a very long session makes each consultation progressively more expensive. Enabling or disabling it mid-session doesn't invalidate your main model's cache.

It's experimental and requires the Anthropic API — not available on Bedrock, Claude Platform on AWS, Google Cloud's Agent Platform, or Microsoft Foundry. Turn it off with /advisor off or CLAUDE_CODE_DISABLE_ADVISOR_TOOL=1. A Fable 5.1 advisor needs v2.1.255 or later.

Route by job, not by session

The biggest wins come from not using one model for everything. Claude Code lets you override the model at three levels below the session.

Per subagent. In a custom subagent's frontmatter:

---
name: code-reviewer
description: Reviews code for quality and best practices
tools: Read, Glob, Grep
model: sonnet
---

The model field takes sonnet, opus, haiku, fable, a full model ID like claude-opus-5, or inherit. There's an effort field too. Resolution order is: a per-invocation model parameter, then the frontmatter, then CLAUDE_CODE_SUBAGENT_MODEL, then the main conversation's model. To push every subagent onto a cheap model without editing definitions:

{
  "env": {
    "CLAUDE_CODE_SUBAGENT_MODEL": "haiku",
    "CLAUDE_CODE_SUBAGENT_MODEL_FORCE": "1"
  }
}

The _FORCE variant requires v2.1.257 or later. This is a real lever: search-and-summarize subagents that read forty files and return a paragraph rarely need your main model, and they're often the bulk of your token spend. See the subagents guide for which tasks are worth delegating in the first place, and the worktrees guide if those subagents write files in parallel.

Per skill or command. The same model frontmatter key works in a skill or command file. The override applies for the rest of the current turn and isn't saved to settings; your session model resumes on your next prompt. (See the skills and plugins guide.)

Per phase, with opusplan. Uses Opus while plan mode is active for the reasoning and architecture, then switches to Sonnet for code generation. It matches how the work actually splits — the expensive thinking happens before the editing — and pairs naturally with plan mode. The tradeoff is in the next section: every plan-mode toggle is a model switch, and every model switch starts a fresh cache.

Context windows and what they cost

Fable 5.1, Opus 5, and Sonnet 5 all have 1M-token context windows; Haiku 4.5 has 200K. The important and frequently-missed part: the 1M window uses standard model pricing with no premium for tokens beyond 200K. A 900K-token request bills at the same per-token rate as a 9K one. There is no long-context surcharge to plan around.

What differs is access, by plan:

PlanExtended context
Max, Team (Standard and Premium), EnterpriseOpus is automatically upgraded to 1M with no configuration. Sonnet 4.6 with 1M requires usage credits
ProRequires usage credits
Anthropic API and pay-as-you-goFull access

Sonnet 5 is the exception worth knowing: on the Anthropic API it always runs with the 1M window. There's no 200K variant, no [1m] suffix to select, and no usage credits required on any plan. That's a large part of why Sonnet 5 is a better default than its price suggests.

Sessions on a native-1M model auto-compact before the window fills, at about 967K tokens by default. Models running at 200K compact at the 200K boundary. You can move that line:

{
  "autoCompactWindow": 500000
}

Or set it live with /autocompact 500k (also accepts a plain token count, or a bare number from 100 to 1000 meaning thousands). Valid range is 100,000 to 1,000,000, capped at your model's actual window. Lowering it deliberately is a reasonable cost strategy — see the context management guide for what survives compaction and what doesn't. If you need to force 200K behavior everywhere, CLAUDE_CODE_DISABLE_1M_CONTEXT=1 removes 1M variants from the picker and treats natively-1M models as 200K.

Switching mid-session costs you the cache

This is the single most expensive habit in this whole guide, and it's invisible. Each model has its own prompt cache. Switching with /model means the next request reads the entire conversation history with no cache hits, even though the content is identical. On a session that's an hour deep, that's a full re-read of everything at uncached input prices.

Claude Code asks you to confirm a switch only while the cache is still warm — it stays warm for one cache TTL after the last request or response. (Before v2.1.238, it asked even after the cache had expired, which trained people to dismiss the prompt.) That confirmation is not bureaucracy; it's the bill.

Four things count as a model switch, and three of them don't look like one:

Changing effort mid-session does the same thing on most models — a full uncached re-read, with a confirmation prompt while the cache is warm. The exception: on Fable 5.1 with an API key or a Claude subscription, changing effort keeps the cache and is applied without asking (v2.1.260+).

The habit that follows: pick your model and effort at the top of a session, and save /compact for natural breaks between tasks rather than mid-task. If you keep wanting to switch models mid-session, that's usually a sign the session is doing two different jobs and should have been two sessions.

On automatic fallback: requests that a model's safety classifiers flag — most often in cybersecurity and biology — can re-run on a different model. On Fable, biology-flagged requests re-run on Opus 5 and cybersecurity-flagged ones on Opus 4.8. On Opus 5, cybersecurity-flagged requests re-run on Opus 4.8, while biology-flagged ones end in a refusal instead, since Opus 5 runs its own biology classifiers with no fallback. After a fallback, the session continues on the fallback model — worth noticing, because your session quietly changed models. Turn it off in /config under "Switch models when a message is flagged", or with "switchModelsOnFlag": false.

Pinning defaults, fallbacks, and org limits

Precedence for selecting a model, highest first:

  1. /model <alias|name> during the session
  2. claude --model <alias|name> at startup
  3. The ANTHROPIC_MODEL environment variable
  4. The model field in a settings file
  5. ANTHROPIC_DEFAULT_MODEL for new sessions

Two persistence details. In the /model picker, Enter switches and saves as your default by writing the model field to user settings, while s switches for this session only. Typing /model <name> directly behaves like Enter — so the quick way is also the permanent way, which surprises people. And resumed sessions (--resume, --continue, the /resume picker) keep the model the transcript was saved with, regardless of your current setting.

ANTHROPIC_DEFAULT_MODEL (v2.1.236+) sets the model new sessions start on:

export ANTHROPIC_DEFAULT_MODEL=sonnet

It only applies when nothing higher-precedence selected a model, and it's ignored if you set it to default, inherit, opusplan, or haiku, or if the model isn't available to your account.

Fallbacks, for when a model is unavailable or overloaded:

{
  "fallbackModel": ["claude-sonnet-5", "claude-haiku-4-5"]
}

Or claude --fallback-model sonnet,haiku. Chains are capped at three models after duplicate removal, and the setting doesn't merge across settings files.

For organizations, availableModels restricts the picker and enforceAvailableModels: true makes it binding (v2.1.175+). One matching rule worth knowing before you write a list: a version prefix also matches later model IDs that extend it, so claude-fable-5 permits both Fable 5 and Fable 5.1, while claude-fable-5-1 permits 5.1 only.

Common mistakes

FAQ

Should I use Opus or Sonnet in Claude Code?

Anthropic's guidance is to start with Opus 5 if you're unsure. In practice Sonnet 5 handles most day-to-day coding — reading code, writing tests, mechanical refactors, executing a plan you already reviewed — at roughly 40% of the token price, with the same 1M-token context window. Reach for Opus 5 when the task needs judgment rather than throughput. Pro and Team Standard already default to Sonnet 5; Max, Team Premium, Enterprise, and the Anthropic API default to Opus 5.

What is Claude Fable 5.1 and when should I use it?

Fable 5.1 and Fable 5 are the most capable models in Claude Code, suited to tasks larger than a single sitting: they sustain long autonomous sessions, investigate before acting, and verify their work more often than smaller models. Neither is the default anywhere — select one with /model fable (needs v2.1.257+ for the alias to mean 5.1). The escalation bar is specific: use it when your evals on Opus 5 at higher effort still fall short. On some plans and seat tiers, Fable usage bills to usage credits rather than your plan's included limits.

What do effort levels do?

Effort decides how much thinking, explanation, and tool work goes into a response — it affects all output tokens, so lower effort also means fewer and terser tool calls. Levels are low, medium, high, xhigh, max, with high as the default on every model that supports effort except Opus 4.7 (xhigh). Opus 4.6 and Sonnet 4.6 have no xhigh; Haiku 4.5 has no effort support at all. Set one with /effort, --effort, or CLAUDE_CODE_EFFORT_LEVEL.

Is fast mode worth it?

Only if you're waiting on the response. It's the same Opus model with a speed-prioritized API configuration — up to 2.5x faster, identical quality, at $10/$50 per million input/output tokens, and only on Opus 5 and Opus 4.8. Good for rapid iteration, live debugging, and deadlines; bad for long autonomous tasks and CI. Enable it at the start of a conversation: the first activation charges fast-mode uncached input for the entire context so far.

Does switching models mid-session cost anything?

Yes. Each model has its own prompt cache, so a switch means re-reading the whole conversation with no cache hits. Claude Code confirms the switch while the cache is warm for that reason. Changing effort mid-session does the same on most models — except Fable 5.1 with an API key or subscription, where effort changes keep the cache. Pick model and effort at the top of a session.

Can I use a cheaper model for subagents?

Yes, and it's one of the better cost levers. Subagent frontmatter takes model: (accepting sonnet, opus, haiku, fable, a full model ID, or inherit) and effort:. For a blanket default, set CLAUDE_CODE_SUBAGENT_MODEL. Search-and-summarize subagents rarely need your main model.

Does ultrathink change the effort level?

No. It adds an in-context instruction requesting deeper reasoning on that turn; the effort level sent to the API is unchanged. That's what makes it useful for one hard turn without altering the session. "think", "think hard", and "think more" are not recognized keywords — they're just prompt text.

The model matters less than how you direct it

Claude Lessons has 38 free interactive lessons on the part no model upgrade fixes: framing the task, grounding it in sources, planning before editing, and verifying the result — all practiced hands-on in a simulated Claude Code workspace.

Practice hands-on in the free interactive lessons