Claude Opus 5 (claude-opus-5) shipped on July 24, 2026, in Claude Code v2.1.219, and it’s now the default Opus model across the CLI. If you’ve been running Opus 4.8, the model ID swap is trivial — but three things changed underneath it that are easy to miss if you only skim the release notes: thinking is on by default now, there’s a research-preview “fast mode” at double the price, and two new beta features change how tool availability and safety refusals behave mid-session. None of that is obvious from the one-line changelog entry, so this covers the mechanics of each, with the official docs cited inline.
What Shipped on July 24 (v2.1.219)
The Claude Code changelog entry for v2.1.219 reads: “Added Claude Opus 5 (claude-opus-5), now the default Opus model — 1M context, fast mode at $10/$50 per Mtok.” That’s the summary; the detail is spread across the models overview, the “what’s new” page, and the fast mode docs. Here’s the full spec next to Opus 4.8:
| Claude Opus 5 | Claude Opus 4.8 | |
|---|---|---|
| API model ID | claude-opus-5 | claude-opus-4-8 |
| Standard pricing | $5 / $25 per Mtok | $5 / $25 per Mtok (unchanged) |
| Fast mode pricing | $10 / $50 per Mtok | $10 / $50 per Mtok |
| Context window | 1M tokens (default and max — no smaller variant) | 1M tokens |
| Max output | 128k tokens | 128k tokens |
| Thinking | On by default | Off by default |
| Effort levels | low, medium, high, xhigh, max | low through high |
| Prompt cache minimum | 512 tokens | 1,024 tokens |
Two details worth flagging immediately. First, the headline price didn’t move — Opus 5 costs exactly what Opus 4.8 cost, $5 per million input tokens and $25 per million output tokens. Anthropic’s framing is that you get a “step-change” model at the same rate, not a price increase for more capability. Second, thinking is on by default now: on Opus 4.8, a request without an explicit thinking parameter ran with thinking off; on Opus 5, the same request runs with thinking on, and the effort parameter — not a thinking toggle — is what controls how much of it happens. That’s a behavior change worth testing against, not just a spec bump: max_tokens is a hard ceiling on thinking plus response text combined, so workloads tuned against Opus 4.8’s no-thinking baseline can hit that ceiling unexpectedly. There’s also a breaking API change tucked in here — thinking: {"type": "disabled"} is only accepted when effort is high or lower; setting it alongside xhigh or max effort now returns a 400 error. (Source: What’s new in Claude Opus 5.)
The 1M Context Window in Practice
Opus 5’s context window isn’t a tier you opt into — 1M tokens is both the default and the ceiling, “there is no smaller context variant.” For Claude Code specifically, that matters less for single-file edits and more for two scenarios: pulling a large chunk of an unfamiliar codebase into context for a cross-cutting refactor, and long agentic sessions where tool results, diffs, and conversation history accumulate over hours without a /compact.
The pricing detail that makes this workable: Anthropic’s docs state the 1M window is billed at flat, standard per-token rates the entire way through — “A 900k-token request is billed at the same per-token rate as a 9k-token request.” There’s no long-context surcharge tier the way some other providers structure pricing past 200k tokens. What does change your bill at scale is what you put in that window and how much of it is cache reads versus fresh tokens — a session that reloads the same 400k-token codebase snapshot on every turn without prompt caching enabled will cost roughly the same per token whether it’s turn 1 or turn 40, which is exactly the failure mode caching exists to prevent. (See our context window management strategies guide for the operational side of this — when to /compact, when to reference files instead of pasting them, and how to read the pressure signals before a session degrades.)
One more wrinkle: Claude 4.7-and-later models, Opus 5 included, use a newer tokenizer that produces roughly 30% more tokens for the same text compared to pre-4.7 models. If you’re estimating context usage from an older baseline, pad your estimate.
Fast Mode Pricing Breakdown
“Fast mode” is not a different model — it’s Opus 5 (or Opus 4.8) run under a faster inference configuration, delivering “up to 2.5x higher output tokens per second” with identical weights and behavior. The speed gain shows up in output tokens per second (OTPS), not time to first token, so it’s most noticeable in streaming responses where Claude is generating a long block of code or prose, not in the latency before it starts.
The mechanics, precisely:
- How to enable it: set
speed: "fast"and include thefast-mode-2026-02-01beta header. There’s no equivalent toggle exposed directly in the Claude Code CLI as a flag today — this is an API-level parameter, relevant if you’re calling the API directly or through a tool that exposes it, not something you flip in aclaudesession by default. - Pricing: $10 per million input tokens, $50 per million output tokens — a flat 2x multiplier on Opus 5’s standard rate, and it applies across the entire context window, including requests over 200k input tokens.
- Where it works: Claude API only (including Claude Managed Agents). Not available on Amazon Bedrock, Google Cloud, Microsoft Foundry, or Claude Platform on AWS.
- What it doesn’t cover: the Batch API, and it can’t be combined with a Priority Tier commitment.
- Access: it’s a research preview — you need your account manager to enable it, or you join a waitlist if you don’t have one. This isn’t a self-serve flag you can flip today.
- The catch that matters operationally: switching between fast and standard speed invalidates the prompt cache. Requests at different speeds don’t share a cached prefix, so toggling fast mode on and off mid-session throws away your caching savings on every switch. If your workflow does automatic fallback from fast to standard on rate limits (which Anthropic’s own retry examples show), budget for that cache miss.
- Rate limits are separate: fast mode has its own token-per-minute limits, distinct from your standard Opus rate limits, surfaced via
anthropic-fast-input-tokens-*andanthropic-fast-output-tokens-*response headers.
(Source: Fast mode docs.)
Practically: fast mode is a latency lever for interactive, output-heavy workloads at 2x the token cost, gated behind an access request, and not yet something most Claude Code users can turn on with a config flag. Worth knowing the mechanics exist; not something to plan a workflow around until it leaves research preview.
Mid-Conversation Tool Changes, Explained Mechanically
This is a beta introduced with Opus 5, and it solves a specific caching problem. Normally, the tools array sits at the very front of a request’s hashed prefix — earlier in the prefix than even the system prompt — so editing it to add or remove a tool invalidates the prompt cache for the entire conversation that follows. For a long agentic session where you want to progressively expose or retire tools as a task advances, that’s expensive: every tool-list change forces a full cache miss.
Mid-conversation tool changes fix this without touching the tools array at all. Here’s exactly how it works, per the official docs:
- Declare the full tool set up front, in
tools, and never change it for the life of the conversation. This is what keeps the cached prefix intact. - Any tool can start withheld by setting
defer_loading: trueon its declaration — it’s part of the cachedtoolsarray but not offered to the model yet. - To surface or withdraw a tool mid-session, append a message with
"role": "system"containing atool_additionortool_removalcontent block. Each block references the tool by name —{"type": "tool_reference", "name": "..."}for a normal tool, ormcp_tool_reference/mcp_toolset_referencefor individual or whole-server MCP tools — rather than redefining it. Referencing a name not present intoolsreturns a 400 error. - The change applies from that point in the conversation onward. A later
tool_additioncan re-offer a tool an earliertool_removalwithdrew. - Placement is constrained, same as any mid-conversation system message: it must immediately follow a
userturn (including one carryingtool_resultblocks) and must either end the array or be immediately followed by anassistantturn. It cannot sit between atool_useblock and its matchingtool_result— that returns a 400 error.
What triggers a change is entirely up to your application logic — the API doesn’t auto-detect when a tool should appear or disappear. A realistic Claude Code-style use case: expose a narrow set of read-only tools at the start of a session, then use tool_addition to surface write/edit tools only after the model has produced a plan the user approved, without paying a full cache-invalidation cost for that gate.
The beta header is mid-conversation-tool-changes-2026-07-01. It’s available on Claude Fable 5, Claude Mythos 5, Opus 4.8, and Opus 5 — so it’s not Opus-5-exclusive, it just launched alongside it — on the Claude API, Amazon Bedrock, and Google Cloud (not listed for Microsoft Foundry). It is not available on Claude Sonnet 5, which still requires editing the top-level system field for equivalent changes.
Automatic Safety Fallback, Explained Mechanically
This is actually two distinct features that share a name, and conflating them is an easy mistake to make from press coverage alone.
The consumer-facing version (claude.ai and Claude Code) is the one most Claude Code users will actually encounter. When a message triggers Opus 5’s safety classifiers — the documented example is “higher-risk offensive cybersecurity requests, such as: exploit generation, binary-based vulnerability scanning, penetration testing” — the classifier also reviews surrounding context (memory, files, web search results), not just the triggering message in isolation. If it flags the request, the session automatically re-routes to Opus 4.8, described as “our next-most-capable model,” instead of hard-blocking the request. This is enabled by default the first time you select Claude Opus 5, across claude.ai and Claude Code alike. When it fires:
- You see a notice explaining that the model switched.
- The response itself is labeled with the model that actually answered it — it isn’t silent.
- The model picker then stays on the less capable model (Opus 4.8) for the rest of that conversation, rather than snapping back to Opus 5 on the next turn.
- You can turn the behavior off in Settings > Capabilities, toggling “Switch models when a message is flagged.” With it off, a flagged conversation pauses instead of auto-switching.
Anthropic reports that in early testing, Opus 5 traffic hit these cyber-related fallbacks 85% less often than Claude Fable 5 traffic did — a signal that Opus 5’s classifiers are tuned to be less trigger-happy than the top-tier model’s, not that the fallback mechanism itself is new.
The API-level version is a separate, developer-facing feature: the fallbacks parameter on the Messages API, now supporting a "default" mode in beta (server-side-fallback-2026-07-01 header). When a request to Opus 5 or Fable 5 gets a classifier refusal — which returns as a normal response with stop_reason: "refusal", not an error — setting fallbacks: "default" retries it automatically on “the fallback model Anthropic recommends for its refusal category.” For refusal categories with no recommended fallback, the refusal stands as-is. This is opt-in per request, not a global account setting, and it covers refusal categories more broadly than just cybersecurity. (Source: Refusals and fallback.)
The practical distinction: if you’re using Claude Code day to day, the toggle you care about is the Settings > Capabilities one, and it’s cyber-classifier-specific with Opus 4.8 as the sole fallback target. If you’re building on the API directly and want broader refusal-category fallback behavior, that’s the separate fallbacks parameter, and you have to ask for it explicitly on every request.
When to Use Opus 5 vs. Sonnet 5 for Claude Code Work
Both models ship with a 1M token context window and both default to high effort inside Claude Code, so context size alone won’t tell you which to reach for — cost and task shape will.
Sonnet 5 is running introductory pricing of $2/$10 per Mtok through August 31, 2026 (standard $3/$15 afterward), against Opus 5’s flat $5/$25. That’s roughly 2.5x the input cost and 2.5x the output cost right now, closing to about 1.67x once Sonnet 5’s introductory window ends. Anthropic’s own model-selection framing backs this up directly: “start with Claude Opus 5 for complex agentic coding and enterprise work,” while Sonnet 5 is positioned as “the best combination of speed and intelligence” — i.e., the default workhorse, not the fallback.
In practice, for Claude Code sessions specifically:
- Multi-file refactors, unfamiliar large codebases, long-horizon agentic tasks — Opus 5’s documented gains are concentrated exactly here: “staying on task across extended tool-use loops,” “completing multi-file features, larger refactors, and end-to-end feature work without leaving stubs or placeholders.” This is the case where paying 2.5x buys you fewer restarted sessions and fewer half-finished PRs, which is often cheaper in wall-clock time than it looks in token cost.
- Routine edits, well-scoped single-file changes, fast iteration loops — Sonnet 5’s speed-to-intelligence ratio and lower price make it the better default. Since effort defaults to
highon both models in Claude Code, dial Sonnet 5’s effort down explicitly (lowormedium) for tasks that don’t need deep reasoning rather than assuming the model choice alone controls cost. - Code review and bug-finding at scale — this is called out specifically as an Opus 5 strength: “surfacing real bugs at a high rate per pass with few false positives, and staying accurate at lower effort levels.” If you’re running Opus 5 for review, you may not need
higheffort to get the accuracy — that’s one place to recoup some of the cost gap. - Long sessions where verification matters — Opus 5 “verifies its own work without being told to,” per Anthropic’s own migration notes, which also means old prompts carrying explicit “add a verification step” instructions now cause over-verification and should be stripped out when you migrate a Claude Code project’s
CLAUDE.mdinstructions from 4.8 to 5.
For a broader cost-control framework that applies regardless of which model you pick, see our Claude Code cost optimization guide — prompt caching in particular pays off more on Opus 5 now that the minimum cacheable prompt dropped from 1,024 to 512 tokens.
Why the Timing of the Usage Boost Extension Matters
Separately from the model release, Anthropic extended the temporary 50% weekly usage limit boost for Claude Code subscribers — Pro, Max, Team, and seat-based Enterprise — through August 19, 2026. The boost had been set to expire around July 19 and was renewed for another month instead of being allowed to lapse.
The timing is the point worth noting: the extension landed the same week as the Opus 5 release, which is now the default Opus model consuming those weekly limits. Opus 5 didn’t get cheaper per token, and its high-by-default effort plus always-on thinking both push token consumption up relative to a no-thinking Opus 4.8 baseline on equivalent tasks. A higher weekly ceiling arriving in the same window as a heavier-by-default model is a reasonable explanation for why Anthropic chose to extend rather than let the boost expire — it gives subscribers more room to actually try the new default model at its new default behavior before the temporary limits reset. If you’re on a Pro or Max seat, this is worth checking your /usage output for directly, since some users have reported the boosted limit not reflecting immediately after rollout.
FAQ
Is Claude Opus 5 more expensive than Claude Opus 4.8? No — standard pricing is identical: $5 per million input tokens, $25 per million output tokens for both. What changes your bill is that Opus 5 runs with thinking on by default (Opus 4.8 ran with it off unless requested), which can push output token consumption up on tasks that don’t need deep reasoning unless you dial the effort level down.
Do I need to do anything to get the 1M context window? No. Unlike some earlier Claude generations that offered a smaller context variant, Opus 5 ships with 1M tokens as both the default and the maximum — there’s no separate flag or tier to opt into, and there’s no long-context pricing surcharge past 200k tokens.
Can I use fast mode in Claude Code today?
Fast mode is a Claude API parameter (speed: "fast" plus a beta header), currently in research preview and gated behind an account-manager request or waitlist. It’s not exposed as a standard Claude Code flag as of this writing, and it only works on the Claude API — not Bedrock, Google Cloud, Microsoft Foundry, or Claude Platform on AWS.
Does the automatic safety fallback mean Claude Code will silently switch models on me? No — it’s not silent. If a message trips the cybersecurity-related safety classifiers, Claude Code shows a notice that the model switched to Opus 4.8 and labels the response accordingly. It’s also not mandatory: you can disable it in Settings > Capabilities, and doing so makes flagged conversations pause instead of auto-switching.
Should I migrate an existing Claude Code project from Opus 4.8 to Opus 5 immediately?
The model ID swap is trivial, but check two things first: whether your CLAUDE.md or prompts carry explicit verification instructions (Opus 5 already verifies its own work, so these now cause over-verification), and whether any code disables thinking at xhigh or max effort (that combination now returns a 400 error on Opus 5, where it worked on 4.8).