Claude Sonnet 5 in Claude Code: Is It Worth Switching, and Will It Get More Expensive?
MarkdownA comparison of Sonnet 5 and Opus 4.8: tokenization, task cost, benchmarks, measuring usage, and commands for switching models.
Read full article
Learn more about working with models in the Ailoot documentation.
What happened on June 30: Sonnet 5 became the default model in Claude Code
Key points
On June 30, 2026, Anthropic released Claude Sonnet 5 and made it the default model on the Pro, Team Standard, and Enterprise plans. If you have Pro and updated Claude Code, you're already using it. On Max plans and through the API, Opus 4.8 remained the default, so switching is a deliberate choice on your part.
On June 30, Anthropic launched Sonnet 5 and quietly set it as the default model. For some users, the model changed on its own; for others, it stayed the same. It depends on the plan.
| Your plan | Default model after June 30 |
|---|---|
| Pro, Team Standard, Enterprise (subscription) | Claude Sonnet 5 |
| Max, Team Premium, Enterprise (pay-as-you-go), API | Claude Opus 4.8 (unchanged) |
The first thing to do is check which model you're currently using. In Claude Code, type:
/status
The command shows the active model and account details. If it says claude-sonnet-5 and you didn't switch manually, the default model changed on its own.
Sonnet 5 requires Claude Code version 2.1.197 or later. If the /model command doesn't show the fifth-generation model in the list, update:
claude update
Next, I'll address the main question that prompted this analysis: Anthropic says “cheaper,” but people's token bills have gone up. Why? That's in the next section.
Why doesn't “cheaper” on paper mean cheaper in your wallet?
Key points
At promotional prices, Sonnet 5 costs $2 per million input tokens and $10 per million output tokens—half the price of Opus 4.8. But Sonnet 5 has a new tokenizer: it splits the same text into more tokens. Anthropic puts the increase at between 1.0 and 1.35 times, depending on the type of text. The rate per token is the same, but there are more tokens, so the bill goes up.
After the promotion, Sonnet 5 costs $3 per million input tokens and $15 per million output tokens. That's exactly what the previous Sonnet 4.6 cost. There is no “per-token” price reduction. “Cheaper than Opus” applies only compared with Opus 4.8 ($5 and $25), not compared with its own previous version, where the price is at parity.
The model charges for tokens, not letters: chunks of text into which it divides your prompt. Sonnet 5 has a new tokenizer, which breaks the same file into more chunks.
Anthropic puts the increase at “between 1.0 and 1.35 times, depending on the type of text.” Even using its lower range, you pay the same rate for more tokens. The actual bill for the same work goes up.
If there are no published measurements for your language, you can measure the exact multiplier for your own text in a couple of minutes—here's how below.
How much more does one task actually cost?
Key points
The list price is only part of the cost: how many tokens and steps a task takes determines the actual bill, so measure it on your own tasks.
The tokenizer is only half the picture. The other half is that Sonnet 5 takes more steps and generates more text as it works.
The list price says one thing, the actual bill another: the tokenizer and extra steps consume all the promised savings.
And this repeats from one generation to the next. With the previous model, Opus 4.7, a tokenizer change had already increased the number of tokens per request by about 37%.
The conclusion is simple: don't trust the “2.5 times cheaper” headline. Only your own token counts on your own tasks show the real price. I'll show you how to measure it below, but first, where all this fits.
Choosing between Sonnet 5 and Opus is just one cog in the machine. Context engineering—what you put in Claude's context before a request—determines actual token usage. A bloated context will burn any budget on the cheapest model; a well-structured one will save tokens even on an expensive model.
Claude Sonnet 5 vs. Opus 4.8: What can each one do?
Key points
For coding, Sonnet 5 trails Opus 4.8—63.2% versus 69.2% on the SWE-bench Pro benchmark. For knowledge work (reports, analysis, documents), Sonnet 5 is slightly ahead—1,618 versus 1,615 points. In other words, Opus 4.8 is stronger for difficult coding, while Sonnet 5 comes close to the flagship for routine agent work and text tasks at a lower price.
A benchmark by itself doesn't mean much to a vibe coder. But the numbers show where each model is strong. Here are Anthropic's official results for the three models side by side:
| What is measured | Sonnet 4.6 | Sonnet 5 | Opus 4.8 |
|---|---|---|---|
| Agentic coding (SWE-bench Pro) | 58.1% | 63.2% | 69.2% |
| Terminal work (Terminal-Bench 2.1) | 67.0% | 80.4% | 74.6% |
| Computer use (OSWorld) | 78.5% | 81.2% | - |
| Knowledge work (GDPval) | 1395 | 1618 | 1615 |
Opus 4.8 keeps its lead on difficult agentic coding—69.2% versus 63.2% on SWE-bench Pro. Those six points represent the kinds of tricky bugs and architectural knots where Opus figures out what Sonnet abandons halfway through. But difficult coding tasks are the only row where Opus leads. On terminal work (80.4% versus 74.6%) and knowledge work (assembling a report, analyzing data), Sonnet 5 has already surpassed the flagship.
A complete guide to “which model for which type of task,” including how to set the effort level with /effort, is in the separate guide on choosing Sonnet or Opus in Claude Code—it explains how to route models by task type. Here, the focus is different: is it worth changing what already works for the sake of a new model?
How can you calculate what Sonnet 5 will cost you?
Key points
In Claude Code, /cost helps compare session usage, including input and output. It does not isolate a tokenizer change: session totals include history, tool results and generated output. Measure tokenization on one identical fixed input without history, and measure whole-task cost separately in independent sessions.
Don't trust someone else's numbers—measure your own. Claude Code can show usage right in the session. Here are three commands:
/usage- the main usage screen: session cost, remaining plan limits, and tokens by model. The/costand/statscommands open tabs within it./cost- a breakdown of the current session: how many tokens were used, which models used them, and input and output separately./stats- a longer view: total sessions and tokens over several weeks.
An important caveat: the dollar amount shown by these commands is a local estimate based on token counts, and may differ from the actual bill. But it's more than sufficient for comparing two models.
Here's the exact recipe for measuring how much more Sonnet 5 costs for your own tasks:
- To compare tokenizers, choose one fixed input, including the same instructions and file contents, with no conversation history. Compare the input-token count for that exact input under each model; exclude generated output. That ratio describes input tokenization only.
- To compare a real task, start two independent sessions from the same project state, one per model. Use the same prompt, effort level, available tools and success criteria. Do not switch models halfway through one shared conversation.
- Record usage before and after each task. Use the input, output, cache-read and cache-write deltas, together with the applicable rates, to estimate task cost; keep retries and failed attempts in the total.
- Check the resulting code against the same tests. Compare the cost of a successful result, rather than dividing aggregate token counts and calling that a price multiplier.
How do you switch to Sonnet 5 and roll back if it doesn't work for you?
Key points
To switch to Sonnet 5, run /model sonnet in the session. To roll back to Opus 4.8, run /model opus. Going back to Sonnet 4.6 is trickier: the sonnet alias now points to version 5, so you have to specify the full name—/model claude-sonnet-4-6. Switching takes effect immediately; you don't need to restart the project.
Changing models in Claude Code takes one command and applies immediately. Here are all the options, including how to roll back, because after the comparison in the previous section, you may want to switch back.
Switch in the current session:
/model # open the model list and choose
/model sonnet # switch to Sonnet 5
/model opus # switch to Opus 4.8
In the list, Enter saves the choice as the default for new sessions; the s key applies it only to the current session.
Roll back if the new model doesn't work for you. There's a catch: the short name sonnet now points to version 5. To return specifically to the proven Sonnet 4.6, use its full name:
/model claude-sonnet-4-6 # back to the previous Sonnet
/model claude-opus-4-8 # back to Opus 4.8
/model default # reset to the account's recommended default
Pin a model for the entire session with an environment variable:
export ANTHROPIC_MODEL="claude-opus-4-8" # start with Opus pinned
claude
Set the default model permanently in the settings.json settings file:
{ "model": "opus" }
It's also useful to know about opusplan mode. It uses Opus for the planning stage, where depth of thought matters, then switches to Sonnet for execution, where price matters. The “expensive brain, cheap hands” compromise is a sensible default if you don't want to choose manually for every task.
Who really benefits from Sonnet 5, and who should stay with Opus?
Key points
Sonnet 5 is a good deal for routine agent work at low and medium effort: a first pass through code, generating tests, exploring a project, and large batches of similar tasks. Keep Opus 4.8 for the hard work: architecture, difficult bugs, security reviews, and anything at high effort. The reason: at maximum effort, Sonnet 5 costs more per task than Opus, while trailing it on difficult coding quality.
A simple routing rule derived from the benchmarks and prices is: Sonnet 5 for execution, Opus 4.8 for judgment. Here's the same idea as a task decision map:
| Your task | Model | Why |
|---|---|---|
| First pass through code, project exploration | Sonnet 5 | Low cost at low-to-medium effort, with enough quality |
| Test generation, small refactors | Sonnet 5 | Routine work where cost matters more than depth |
| Large batches of similar agent tasks | Sonnet 5 | Cost per task is decisive |
| Analyzing data, assembling a report | Sonnet 5 | Outperforms Opus 4.8 on knowledge work |
| Architectural decision, choosing an approach | Opus 4.8 | The costliest mistake is skimping on judgment |
| Difficult bug with an unclear cause | Opus 4.8 | Sustains deeper reasoning for longer |
| Code security review | Opus 4.8 | You need paranoia, not speed |
| Any difficult task at high effort | Opus 4.8 | Sonnet 5 costs more per task here, with similar quality |
The main counterintuitive conclusion: at high effort (xhigh, max), Sonnet 5 loses its price advantage. It takes more steps and burns more tokens, so one difficult task costs more than it would on Opus 4.8—even though Opus still delivers better quality on difficult coding. So keeping Opus as the default makes sense if most of your work is difficult and uses high effort.
If most of your work is routine agent work of moderate complexity, Sonnet 5 at standard effort is currently a good deal, especially during the promotional pricing through August 31.
What are people who have already switched saying?
Key points
The community is divided. Some developers called the release a flop because of tokenizer-driven price increases, stricter censorship, and a step forward that felt too small. Others praise Sonnet 5 for delivering Opus-level agent work at a lower cost and for letting them control usage precisely through the effort level. The metrics went up, while many people's lived experience got worse—that's the disconnect.
A wave of dissatisfaction emerged in the first few hours after release. The label “useless flop” immediately stuck to the launch.
Three main complaints, without the emotion:
- Tokens cost more. The new tokenizer eats up the promised savings—that's what this whole analysis above is about.
- More refusals. The model rejects contentious prompts more readily; its censorship is stricter. Many people say the previous Sonnet 4.6 felt faster, smarter, and less constrained.
- The step forward is too small. The difference from 4.6 doesn't justify switching, especially given the price increase.
But the picture isn't one-sided. People who run agent tasks like Sonnet 5: its quality is close to Opus, and its price is lower at low effort. They also praise the effort control, which is a real lever for managing the bill. Those who used Claude for creative writing, however, are unhappy—the model has become drier and more cautious in its wording.
My conclusion from all this noise: the “flop” wave is mostly about inflated expectations. People expected a leap and got a cautious step forward with more expensive tokens. Technically, Anthropic delivered a working model. There's only one right question here: is it a good deal for you on your tasks? You can only check that with your own token bill—other people's posts can't judge that for you.
A practical scenario: testing on your own tasks
Key points
The author of this scenario isn't rushing to switch or to roll back. On the author's Max subscription, Opus 4.8 remains the default, and he keeps it for difficult tasks. He uses Sonnet 5 for routine work—a first pass, tests, exploration—and measures usage with /cost on his real projects. He uses the promotion through August 31 to gather statistics on his own tasks, rather than rely on other people's benchmarks.
When a new model comes out, the scenario's author tests it without rushing to a conclusion—hype is always louder than reality in the first few days. Sonnet 5 is exactly that kind of case.
Here are the steps in this scenario:
- Checked the default model. The author has Max, so Opus 4.8 remained the default. He keeps it for difficult tasks.
- Put Sonnet 5 on routine work. A first pass through code, generating tests, exploring the project—it's inexpensive for this work, and its quality is sufficient.
- Measured on his own tasks. After each session, the author checks
/costand compares usage. He uses his own real code, not other people's benchmarks. - Use the promotion. Until August 31, Sonnet 5 is available at a reduced price—a good time to gather statistics on what it costs the author personally while it's still cheap.
It's impossible to guess the “right” model once and for all. Models change every month, along with prices and tokenizers. What always works is knowing how to measure usage in two minutes and make decisions based on numbers rather than headlines. Choosing a model is a skill you'll need with every new release.
Sources
For further work, try Ailoot.
More details
Questions about Claude Sonnet 5 in Claude Code: Is It Worth Switching, and Will It Get More Expensive?
Can I isolate the tokenizer difference by switching models in one conversation?
No. The second run sees accumulated conversation history and may generate a different answer. Compare tokenization on one identical fixed input without history; that input-token ratio is not a total task-price multiplier.
How should I compare the cost of a real task?
Start independent sessions from the same project state and prompt, with the same effort and tool permissions. Compare input, output and cache-usage deltas, applicable prices and whether each result passed the same checks; keep retries in the total.