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
- Model Architecture
- New Programming Capabilities
- Agent Capabilities
- Working with Long Context
- Generation Speed
- API Cost
- Programming Tests
- Document Analysis Tests
- Model Limitations
- When Sonnet 5 is Better than GPT-5.5
- Who Should Switch
- Frequently Asked Questions
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.