Claude Sonnet 5 A Comprehensive Review of Anthropic's Model

Updated:
Ask AI about this article
Claude Sonnet 5 A Comprehensive Review of Anthropic's Model
TL;DR. Claude Sonnet 5 is Anthropic's most powerful Sonnet-level model, released on June 30, 2026. Its performance approaches that of Opus 4.8 but at a significantly lower cost: $2/$10 per million input/output tokens until August 31, 2026 (then $3/$15). The context window is 1M tokens, with a maximum output of 128K tokens. Its main advantage is a better price-performance ratio on agent tasks (coding, tool use, computer use) compared to its predecessor Sonnet 4.6 and competitors like GPT-5.5.

Contents

What's New in Claude Sonnet 5

On June 30, 2026, Anthropic released Claude Sonnet 5—a model the company directly calls the most agentic in its Sonnet lineup. This is an important phrasing: if previous Sonnet generations (3.5, 3.6, 3.7) ushered in an era of agentic coding, and the most notable agentic achievements of the past year were reserved for Opus-level models, then Sonnet 5 brings this leadership back to the mid-price segment.

According to official Anthropic data, Sonnet 5 significantly improves performance compared to Sonnet 4.6 in reasoning, tool use, coding, and knowledge work tasks, approaching Opus 4.8 in performance while remaining considerably cheaper. The model immediately became the default for Claude.ai's Free and Pro plans and is available in Max, Team, Enterprise, Claude Code, and via the Claude API under the identifier claude-sonnet-5.

Another significant change is the updated tokenizer (similar to the one introduced in Opus 4.7): the same text can now be converted into a larger number of tokens, approximately 1.0–1.35 times more depending on the content type. Anthropic states that the starting price has been set to make the transition approximately cost-neutral.

Model Architecture

Sonnet 5 is built on the same conceptual foundation as previous Claude generations—adaptive thinking—where the model dynamically allocates a "reasoning budget" based on the complexity of a specific request, rather than using a fixed reasoning depth for any task. In Sonnet 5, this mechanism has an expanded range of effort levels: low, medium, high, max, and a new, highest level, xhigh (extra high).

Technically, the effort level is a request parameter that controls how many tokens the model allows itself to spend on internal thinking before generating the final response, and how aggressively it verifies its own intermediate steps in the agentic cycle. At lower levels (low, medium), the model is optimized for speed and cost—suitable for classification, short answers, and simple tool calls. At higher levels (high, max, xhigh), it spends more tokens on step-by-step analysis, re-verification of logic, and context exploration before acting—this directly impacts quality in complex agentic scenarios but proportionally increases both cost and request latency.

It's important to understand the selection mechanism: effort level is not a switch between "different models" within Sonnet 5, but a parameter of the same checkpoint that changes the computational budget during inference. This is a fundamentally different approach compared to when the team chose between Sonnet and Opus as two separate models—now, the same checkpoint can handle both low-cost, high-volume tasks and complex tasks that previously required switching to a more expensive model. A detailed description of the parameter can be found in the Claude API documentation on effort levels.

Anthropic illustrates the economic effect of this approach with cost-performance graphs for two evaluations: agentic browsing (BrowseComp), where the model must autonomously search for information on the web, building a chain of queries and refinements, and computer use (OSWorld-Verified), where the model controls a real desktop environment—opening applications, clicking, filling forms. On both benchmarks, the Sonnet 5 curve lies significantly above the Sonnet 4.6 curve at any expenditure level—meaning it's not just "a new model that's more expensive but also better," but a strict improvement of the cost-performance frontier. At the maximum effort level (xhigh), Sonnet 5 approaches the performance of Opus 4.8 in individual tasks while operating at a medium-high effort level. However, running Sonnet 5 at xhigh can be more expensive than Opus 4.8 at a comparable level—therefore, for the most demanding tasks, Opus 4.8 with a lower effort level often remains the more economically viable choice.

Practical advice for production systems: do not fix a single effort level globally for the entire application. It's more sensible to route requests dynamically—keep simple tool calls and classification at low/medium, and complex multi-step agent chains (refactoring, computer use, research tasks) at high or max only when the task complexity justifies it.

At the modality and interface level, Sonnet 5 supports text, image (vision), and file inputs, structured outputs with JSON schema, prompt caching, built-in web search, and full computer use—controlling the browser and terminal as part of the agentic cycle, where the model itself decides when to call a tool and when to continue reasoning. For scenarios where the agent performs potentially dangerous actions (executing code, interacting with external systems), Sonnet 5 has real-time cyber safeguards enabled by default—a separate circuit that monitors and blocks explicitly harmful usage patterns during inference, without requiring an additional filter on the developer's side.

New Programming Capabilities

The most noticeable changes for developers concern not "knowledge of programming languages"—the difference between model generations has long ceased to be the main factor here—but the model's behavior during prolonged, multi-step work on code. This is confirmed by benchmarks and independent measurements in real IDEs.

According to published figures, on SWE-bench Verified, Sonnet 5 shows 85.2%—a significant leap from Sonnet 4.6. On the more complex, contamination-resistant variant, SWE-bench Pro (tasks from actively maintained repositories without leakage into training data), the result is 63.2%, which is five points higher than Sonnet 4.6 (58.1%) and six points behind Opus 4.8 (69.2%). It's important not to confuse these two benchmark variants: Verified and Pro measure different task complexities, and comparing a number from one to a number from the other is incorrect.

The result on Terminal-Bench 2.1 is particularly noteworthy—a benchmark that tests the execution of realistic command-line tasks in a containerized environment: installing dependencies, running test suites, working with configurations. Sonnet 5 scores 80.4% here, which is higher than Opus 4.8's score (74.6%). This is the first recorded instance where a Sonnet-level model surpasses the older Opus model on the same harness of the same generation—and terminal work has historically been considered a strong suit of the Sonnet line since the days of 3.5 and 3.6.

Independent confirmation of direct improvement comes from CursorBench—an internal benchmark by the Cursor team, measured in their production harness: Sonnet 5 shows 57% compared to 49% for Sonnet 4.6—the largest gain between consecutive Sonnet releases that Cursor has recorded.

According to feedback from Anthropic's early partners, Sonnet 5 is more likely to complete complex tasks where previous Sonnet versions stopped halfway, and it verifies its own results without explicit prompting. In one of the provided examples, the model, while investigating a bug, wrote a test that reproduced the problem without additional instructions, implemented a fix, and then temporarily stashed the change to confirm that the bug indeed returned without the fix.

This aligns with observations from engineers who tested the model on "brownfield" code—race conditions, hidden tests, code sections that no one wants to touch. According to Domenic Elm, founding engineer at one of the early access partners, the model is better at tracing the true root cause of errors in such code instead of patching the symptom—rather than just proposing the quickest visible fix.

The practical implication for teams: if the main bottleneck today is terminal agent tasks (CI scripts, DevOps automation, Docker work), Sonnet 5 is worth testing as a full alternative to Opus 4.8 in this specific scenario—according to official figures, here it not only catches up to the flagship but surpasses it at a significantly lower token cost.

Agent Capabilities

Agenticity is the central thesis of the release, and this is where the difference between Sonnet 5 and Sonnet 4.6 is greatest in absolute terms. The model can build an action plan, use tools like a browser and terminal, and operate autonomously at a level that just a few months ago required larger and more expensive models.

On OSWorld-Verified—a computer use benchmark where the model controls a real desktop environment (opens applications, fills forms, navigates interfaces it has never seen before)—Sonnet 5 scores 81.2%, closely approaching Opus 4.8 (83.4%). On BrowseComp, an agentic search task requiring the construction of a chain of refining web queries to answer a complex factual question, the result is 84.7%.

The most unexpected result is on GDPval-AA v2, a benchmark for economically significant knowledge work (analytical reports, professional documents, business tasks): Sonnet 5 scores 1,618 Elo against Opus 4.8's 1,615. The three-point difference is statistically insignificant and lies within the measurement noise, but the very fact that a mid-priced model has matched the generation's flagship on knowledge work tasks for the first time is an important signal for how Anthropic sees Sonnet 5's positioning within the lineup.

An illustrative example of agentic autonomy from the official announcement: a team was tasked with a two-stage business process—updating customer tier levels in Salesforce and sending a launch announcement to corporate contacts. Previously, such tasks would stall midway; Sonnet 5 completed the process autonomously, without intermediate human intervention. A similar pattern is described by a representative from insurance workflow provider Pace: the model sequentially selects the correct action and executes it quickly on tasks like application intake, first notice of loss, and loss run processing—precisely the class of multi-step work with the browser and internal systems that OSWorld-Verified measures.

On the security level of agentic behavior, Anthropic also notes progress: the model is better at refusing harmful requests and is more resistant to prompt injection attempts—critically important for agentic scenarios where the model independently reads and processes external, potentially hostile content (pages, documents, API responses) as part of its workflow. The level of hallucinations and sycophancy (excessive user-pleasing) is also lower than in Sonnet 4.6, and real-time cyber safeguards are enabled by default—a circuit that monitors and blocks explicitly harmful usage patterns during inference.

It's worth considering the limits of capability: on the most demanding corridor of agentic tasks (SWE-bench Pro, most complex xhigh scenarios), Opus 4.8 still leads by six points. Sonnet 5 does not completely replace Opus 4.8—it moves the threshold of "good enough" agentic autonomy to a significantly lower price level, leaving the flagship for cases where the cost of error is higher than the difference in token cost.

Working with Long Context

Claude Sonnet 5 operates with a 1M token context window—and this is not an optional mode but the default and maximum value: there is no separate "smaller" model variant with a narrower context, unlike some previous generations where the 1M context was enabled by a separate beta header. The maximum output volume is 128K tokens on regular requests (up to 300K via the extended beta Batch API mode).

A fundamental difference from the approach of some competitors is the absence of a surcharge for request length: a request of 900,000 tokens is billed at the same price per token as a request of 9,000. The context window includes everything that goes into the request and is generated in the response: system prompt, message history, tool call results, images and documents, as well as tokens spent by the model on internal thinking (extended thinking)—meaning there is no "free" thinking outside the context budget.

For long agent sessions, where dialogue history and intermediate tool results gradually fill the window, Sonnet 5 supports context awareness—the model automatically tracks its remaining token budget throughout the conversation and receives updates after each tool call (e.g., Token usage: 35000/1000000; 965000 remaining), allowing it to plan how much context can still be spent on problem exploration and how much to leave for the final answer. For cases where the conversation does approach the window limit, the platform offers server-side context compaction as the primary strategy for managing long agent workflows, without requiring manual history truncation on the application side.

The economics of long context are significantly improved by prompt caching: reusing a large stable prefix (system instructions, document template, codebase context) costs significantly less than a regular input token—reading from the cache is billed at a substantially lower rate than a base input token, which in practice can result in up to 90% savings on repeated context. For non-urgent batch tasks, the Batch API is also available with a 50% discount on input and output tokens.

For practical tasks, this means the ability to load a large codebase, a long technical document, or an entire package of legal materials for analysis in a single request—without chunking and without a price penalty for request size. One of the examples of use provided by Anthropic is legal research, where long context and price-performance ratio made the migration to the new model an obvious solution for the team.

A technical nuance to consider during planning: due to the new tokenizer, the same text is converted into approximately 30% more tokens than on Sonnet 4.6. This does not reduce the effective capacity of the window in tokens (it remains 1M), but it reduces how much *text* actually fits into the same window—therefore, max_tokens limits set for Sonnet 4.6 should be recalculated rather than directly transferred.

Claude Sonnet 5 A Comprehensive Review of Anthropic's Model

Generation Speed

Anthropic does not publish a separate "tokens per second" benchmark in its press release, instead focusing on another aspect of speed – the speed of achieving results in an agentic loop: the same output quality in fewer steps. According to feedback from one of the teams using the model in analytical agents for data processing, Sonnet 5 "thinks" in more compact steps, which directly reduces the time to gain insight – a difference that end-users of the product feel.

To assess "raw" generation speed, it's worth referring to independent trackers, as these metrics depend on hosting infrastructure and can vary between Anthropic API, AWS Bedrock, and Google Vertex AI. According to Artificial Analysis measurements for the maximum effort configuration (xhigh), the model generates about 73.7 tokens per second – this is below the median (80.7 t/s) among reasoning models in a comparable price segment. The time to first token (TTFT) on this configuration is significantly higher than the median – a direct consequence of the model first spending a significant budget on internal reasoning at the maximum effort level before starting to generate a visible response.

Practical takeaway for developers: these numbers apply specifically to the xhigh configuration and do not reflect the model's typical behavior at low or medium effort levels, where both TTFT and throughput are significantly better. Effort level directly affects perceived speed – if latency is critical for the product (e.g., a real-time chat interface), it's worth consciously testing lower effort levels instead of the default adaptive mode, rather than relying on benchmarks taken at maximum effort.

API Cost

Period Input Tokens (per 1M) Output Tokens (per 1M)
Introductory Price (until 08/31/2026) $2 $10
Standard Price (from 09/01/2026) $3 $15

For comparison, Opus 4.8 costs $5 per million input and $25 per million output tokens – meaning even at the standard price, Sonnet 5 remains noticeably cheaper with comparable performance on some tasks. Anthropic also announced increased rate limits in Chat, Cowork, Claude Code, and Claude Platform to compensate for higher token consumption at high effort levels.

It's worth considering a nuance with the tokenizer: the same text after switching to Sonnet 5 may require 0–35% more tokens. This is not a "hidden" price increase – the introductory price is precisely set to compensate for this effect – but when planning a budget, it's better to include this difference in calculations.

Programming Tests

According to data released immediately after the launch, Sonnet 5 shows significant growth in agentic coding: according to TechCrunch, on one of the benchmarks, the model scores 63.2% compared to 69.2% for Opus 4.8 and 58.1% for Sonnet 4.6 – meaning the gap with the flagship model has significantly narrowed compared to the previous generation.

The biggest leap was recorded on Terminal-bench – an evaluation that tests the execution of multi-step tasks in a real terminal: according to reports based on official launch materials, the score increased by approximately 20 points compared to Sonnet 4.6. This directly correlates with what early testers describe – the model maintains focus on complex tasks for longer and conducts more thorough code base investigations before making changes.

Important caveat: Opus 4.8 remains the better choice for tasks where maximum accuracy is critical, especially at high effort levels. Sonnet 5 does not attempt to replace Opus – it expands the range of available trade-offs between price and quality.

Document Analysis Tests

Anthropic has not published a separate public benchmark specifically for "document analysis" for Sonnet 5 – here, the most indicative data is qualitative rather than quantitative. In an example with a law firm, the team noted that Sonnet 5 shows the best results in legal research and analytics, and it was the price-quality ratio that made the transition to the new model an obvious decision.

Practically, for tasks involving long documents (contracts, technical documentation, archives), the key factors remain: a 1M token context window without a surcharge for length, support for file and graphical inputs, and the ability to increase the effort level for more complex analysis cases. If reproducible numerical indicators are needed specifically for RAG and document-QA scenarios, it's sensible to run your own set of documents through an evaluation pipeline rather than relying solely on general agent benchmarks.

This is precisely why I don't rely solely on others' benchmarks when evaluating a new model for document QA – in my own project AskYourDocs, a self-hosted platform for working with documents based on Spring AI, Ollama, and pgvector, I regularly apply new models to clients' real RAG pipelines. A telling case I've described before: for a legal client with an archive of scanned documents, the quality of answer extraction increased from 17% to 50% solely by changing the approach to OCR and embeddings – and it is such practical experiments, rather than general agent benchmarks, that provide a real picture of how the model behaves on "dirty" scanned archives, not on clean text datasets.

When access to Claude Sonnet 5 becomes available in the AskYourDocs production pipeline, we plan to run the same set of real documents and compare the accuracy of answers with previous models – I will add the results here in a separate update.

Model Limitations

  • Does not surpass Opus 4.8 on the most complex tasks. On SWE-bench Pro – the most challenging and contamination-resistant version of the coding benchmark – the gap with the flagship is six points (63.2% vs. 69.2%). This is a systemic, not an accidental, gap: at the highest effort level (xhigh), Sonnet 5 can even be more expensive than Opus 4.8 at a comparable effort level without reaching its quality – meaning for tasks at the edge of the model's capabilities, "fine-tuning" Sonnet 5 with maximum settings is not always economically justified.
  • Weaker cybersecurity capabilities – intentionally. Anthropic directly states that the model has significantly lower capability in performing cybersecurity tasks compared to current Opus models. In a joint test with Mozilla on developing exploits for real Firefox 147 vulnerabilities, Sonnet 5 did not create a fully working exploit even once. An important nuance: Sonnet 5 is part of the Cyber Verification Program – a verified access program for organizations with legitimate cybersecurity testing tasks – but even within this program, Anthropic officially recommends Opus 4.8 for cybersecurity work requiring reduced guardrails. This means it's a deliberate division of the lineup by purpose, not an oversight in training.
  • Cost change due to new tokenizer. According to official Anthropic data, the same input text is converted into approximately 30% more tokens than on Sonnet 4.6 (range of 1.0–1.35× depending on content type – natural language converts differently than code or structured data). This is not a hidden change in pricing policy: the introductory price of $2/$10 is set to make the transition approximately cost-neutral – but after August 31, when the standard rate of $3/$15 applies, the tokenizer effect will combine with the increase in the base price, and the total cost increase for a request may be more noticeable than it seems at first glance.
  • Lack of separate benchmarks for document QA and writing. Anthropic does not publish standardized numerical indicators specifically for document analysis or editorial writing quality – these categories are partially covered by general knowledge work benchmarks (e.g., GDPval-AA v2), but there is no direct correspondence between "number from the press release → quality on my documents." For these scenarios, you will have to rely on your own testing with real data, rather than official figures.
  • Temporary intro price. After August 31, 2026, the cost of tokens will increase by 50% (from $2/$10 to $3/$15 per million input/output tokens). For teams planning their budget for the end of 2026, this should be factored into calculations in advance, rather than as a surprise in the September bill.
  • No Priority Tier. Unlike some other models in the lineup, Sonnet 5 currently does not have a Priority Tier available – a service level with guaranteed throughput and prioritized request processing during peak load periods. For production systems with strict latency requirements during peak traffic moments, this could be a practical limitation that should be checked before transitioning.

Conclusion: What This Means in Practice

None of the listed limitations negate the main value of the release – better economics on the vast majority of agentic and coding tasks. But collectively, they define a clear perimeter where Sonnet 5 is not a universal replacement for everything used previously:

  • For tasks at the edge of complexity (most challenging agentic scenarios, cybersecurity testing with minimal restrictions), Opus 4.8 remains the right choice – both by direct instruction from Anthropic itself and by benchmark figures.
  • For budgeting the transition, it's important to calculate not the "price per token," but the "price per task": the effect of the new tokenizer (+30% tokens) and the end of the intro period (+50% to the rate after August 31) combine, and the total cost change for a typical request may differ significantly from what a bare price list shows.
  • For scenarios without official benchmarks (document QA, writing), the only reliable way to make a decision is to run your own set of real tasks through both models in parallel, rather than trusting general agentic figures from the press release.

Practical takeaway for a team deciding whether to switch: Sonnet 5 should be considered the default model for new production workflows, but with mandatory A/B testing on real tasks before full migration – especially where Opus was previously used, and savings are planned precisely by lowering the model tier.

When Sonnet 5 is Better than GPT-5.5

OpenAI's GPT-5.5 was released earlier, on April 23, 2026, and is also positioned as an agentic model for coding, computer interaction, and knowledge work. No laboratory has officially published a direct head-to-head benchmark comparison of Sonnet 5 and GPT-5.5 – the models were evaluated on different benchmark sets and at different times, so any direct comparison of figures should be taken with caution.

Where the comparison is correct and unambiguous is price. GPT-5.5 costs $5 per million input and $30 per million output tokens. Sonnet 5, even at the standard price ($3/$15), is 1.7–2 times cheaper, and at the introductory price ($2/$10), it's 2.5–3 times cheaper. Both models have a 1M token context window, so they are on par in this regard.

Practical takeaway: if the token budget is a real constraint (high-frequency agentic workflows, mass RAG queries, production automation), Sonnet 5 offers significantly better economics with a comparable level of agentic capabilities. If the priority is solely maximum accuracy on the most complex tasks regardless of cost, it's worth testing both models (and Opus 4.8) on your own set of tasks.

A detailed benchmark comparison with specific figures for coding, agentic search, and computer use is in a separate article: Claude Sonnet 5 vs GPT-5.5: Detailed Comparison

Claude Sonnet 5 A Comprehensive Review of Anthropic's Model

Who Should Switch

Here I will speak not only from the perspective of analyzing others' benchmarks but also from my own experience migrating models in production systems — I've been through this more than once in my RAG pipelines on Spring AI, and the criteria below are the very questions I ask myself before any transition to a new model.

  • Teams on Sonnet 4.6. This is a direct and almost effortless upgrade — the gain in agent tasks is significant, and the initial price for the transition period compensates for the effect of the new tokenizer. I would switch without much thought, but with mandatory A/B testing on a dozen real tasks before a full switch to production — this is how I check any model change in my own pipelines, and it has never been unnecessary.
  • Teams on Opus 4.8, where budget is a constraint. If current tasks do not require maximum accuracy, I would test Sonnet 5 at a high effort level — savings can be substantial with an acceptable loss of quality. In my own practice, I regularly see that for 60-70% of real tasks, the "most expensive available model" is overkill, and the difference in quality is imperceptible to the end-user.
  • Production agents and automation. Multi-step workflows (CRM updates, ticket processing, computer use) are precisely the scenario where Anthropic demonstrates the most noticeable improvement, and it is precisely there that I personally expect the greatest benefit in my projects, where agents perform sequential actions with external systems, rather than just answering one question.
  • Teams on GPT-5.5, sensitive to token costs. I would test Sonnet 5 as an economical alternative on my own tasks, especially if a 1M token context window is a critical requirement. The price difference here is not marginal, but several times — for me, this is always the first signal to try an alternative, even if the current solution formally satisfies.
  • Who should wait to switch: teams with tasks requiring maximum accuracy at the limit of the model's capabilities (complex mathematics, the most difficult agent scenarios) — here, in my opinion, Opus 4.8 remains the better choice for now, and I myself would not change a reliably working Opus pipeline for savings where the cost of error is higher than the difference in token costs.

My general rule for any model change in production: first, a parallel test on real tasks, and only then a full migration. Benchmarks from press releases provide a guideline on where to look, but I always make the final decision based on my own data, not on others' numbers.

Frequently Asked Questions

What is the price of Claude Sonnet 5 via API?
$2 per million input tokens and $10 per million output tokens until August 31, 2026, then $3/$15.

What model identifier should be used in the API?
claude-sonnet-5. More details in the official Claude models documentation.

Is Claude Sonnet 5 a replacement for Claude Opus 4.8?
No. Sonnet 5 significantly narrows the gap with Opus 4.8 on agent tasks at a much lower price, but for the most complex scenarios requiring maximum accuracy, Opus 4.8 remains the better choice.

What is the context window of Claude Sonnet 5?
1M tokens for input, up to 128K tokens for output, with no surcharge for long context.

Do I need to change prompts after switching from Sonnet 4.6?
There is no direct necessity, but due to the updated tokenizer, it is worth recalculating the token budget and testing critical workflows before a full switch to production.


Read also: