Skip to main content

Claude Sonnet 5: Cheaper Per Token, Not Always Cheaper Per Task

An iceberg with a small glowing tip above water and a vast submerged body below, representing hidden token costs

Anthropic shipped Claude Sonnet 5 on June 30, positioning it as the go-to model for agentic work at a price that doesn't require a flagship budget. At $3 per million input tokens and $15 per million output tokens (after introductory pricing ends August 31), it's priced at roughly 60% of what Opus 4.8 costs. That sounds like an easy call. It's more complicated.

Where Sonnet 5 Actually Earns the "Agentic" Label

The benchmark numbers that matter for builders aren't the ones that get the most press. On SWE-bench Pro, Sonnet 5 scores 63.2% compared to Opus 4.8's 69.2%. That 6-point gap is real. For a coding agent doing open-ended software engineering, it matters.

But Terminal-Bench 2.1 tells a different story. Sonnet 5 scores 80.4%. Opus 4.8 scores 74.6%. That's the first time a mid-tier Sonnet has beaten its flagship sibling on a major coding benchmark, and the margin isn't narrow. For agents that work in the terminal, run shell pipelines, orchestrate Docker environments, or interact with databases, Sonnet 5 is the better model. And it costs less.

BrowseComp comes in at 84.7% as a single agent and 86.6% in multi-agent setup. OSWorld lands at 81.2%, just behind Opus 4.8's 83.4%.

The performance picture is nuanced: Sonnet 5 is weaker on general software engineering, roughly on par for computer-use, and genuinely stronger for terminal-based agents. If I were routing traffic today, I'd send CLI-heavy runs to Sonnet 5 and open-ended coding to Opus. The benchmarks support that split.

The Tokenizer Problem

Here's where the cost story falls apart.

Sonnet 5 uses a newer tokenizer that produces roughly 30% more tokens for the same text compared to older Claude models. The per-token rate is lower, but you're buying more tokens to do the same work. For one-shot tasks, this mostly cancels out. For agentic workflows, it compounds.

Think about what happens in a multi-step agent run. Step 1 generates output. That output goes into the context for step 2. More verbose output at step 1 means more input tokens at step 2. Step 2's output, also more verbose, feeds into step 3. The tokenizer inflation doesn't add cost locally and stop. It multiplies across every subsequent step in the chain.

Throw extended thinking into the mix and it gets worse. Each planning step can add thousands of thinking tokens on top of the extra output tokens. A workflow that's making tool calls, reasoning about results, and looping over a problem will consume far more than the per-token rate card implies.

The Actual Numbers

Artificial Analysis measured cost per task on their Intelligence Index. Sonnet 5 came in at approximately $2.29 per task. Opus 4.8 was around $2.00. Not a 40% discount. A 15% premium, for a model that's marketed as the affordable option.

On output tokens specifically, Sonnet 5 uses roughly 40% more than Sonnet 4.6 for equivalent tasks. On knowledge-work evaluations, it takes around 3x more agentic turns to complete the same work. The per-token rate looks attractive. The per-task cost doesn't.

This isn't a reason to avoid Sonnet 5. It's a reason to measure the right thing. Cost per token is a red herring. Cost per completed task, per agent, per feature is what you actually pay.

What to Actually Do

A few things I'd change in how I build given these numbers.

Route terminal-heavy agents to Sonnet 5. The Terminal-Bench 2.1 lead is real, and CLI tasks are less likely to trigger deep extended thinking chains, so per-task cost for those workloads stays reasonable.

For complex reasoning or open-ended software engineering, Opus 4.8's higher per-task completion rate may make it cheaper once you account for reduced retries and failed tool calls. I haven't verified this at scale, but the per-task numbers suggest it's worth measuring before you commit to a routing strategy.

Disable extended thinking on Sonnet 5 by default. That's where the token cost runs away. A verbose baseline model plus thinking tokens is a fast path to expensive. Only turn it on where the reasoning quality genuinely changes the outcome.

Set explicit token budgets per step. This matters for any model, but it matters more with Sonnet 5. An agent without per-turn token limits can get expensive silently, and the verbosity here means the budget burns faster than your old cost models expect.

One last thing: the introductory rate of $2/$10 ends August 31. If you're benchmarking your agent costs now, run the calculation against $3/$15, not the current rate. The model you evaluate this month is the one you'll pay more for in September.

Comments

Popular posts from this blog

AngularJs call one method of controller in another controller .

I have seen many question about calling one method of one controller in another controller or extending scope of one controller in another controller.so here are the ways. if you want to call one controller into another or extending scope of controllers there are four methods available $rootScope.$emit() and $rootScope.$broadcast() If Second controller is child ,you can use Parent child communication . Use Services Kind of hack - with the help of angular.element() 1. $rootScope.$emit() and $rootScope.$broadcast() Controller and its scope can get destroyed, but the $rootScope remains across the application, that's why we are taking $rootScope because $rootScope is parent of all scopes . If you are performing communication from parent to child and even child wants to communicate with its siblings, you can use $broadcast If you are performing communication from child to parent ,no siblings invovled then you can use $rootScope.$emit HTML <body ng-app = ...

Closures in javascript and how do they work ?

JavaScript Closures for Dummies  Closures Are Not Magic This page explains closures so that a programmer can understand them — using working JavaScript code. It is not for gurus or functional programmers. Closures are  not hard  to understand once the core concept is grokked. However, they are impossible to understand by reading any academic papers or academically oriented information about them! This article is intended for programmers with some programming experience in a mainstream language, and who can read the following JavaScript function: function sayHello ( name ) { var text = 'Hello ' + name ; var sayAlert = function () { alert ( text ); } sayAlert (); } An Example of a Closure Two one sentence summaries: a closure is the local variables for a function — kept alive  after  the function has returned, or a closure is a stack-frame which is  not deallocated  when the function returns (as if a 'stack-fr...

250,000 AI Agent Instances Exposed on the Internet — Is Yours One of Them?

If You're Running OpenClaw, You May Want to Read This A public watchboard has surfaced listing over 250,000 OpenClaw instances that are directly reachable from the internet. Some of these instances have leaked credentials. Many are running on infrastructure already flagged for known CVEs and threat actor activity. This isn't theoretical. It's happening right now. You can check the exposure list yourself at openclaw.allegro.earth . Why This Is a Big Deal OpenClaw is a powerful AI agent framework. That power comes with serious responsibility. A typical OpenClaw deployment runs with: Personal API keys — OpenAI, Anthropic, Google, cloud provider credentials Broad system permissions — file access, shell execution, network requests Autonomous execution capabilities — the agent can act without human approval Complex codebases — large attack surfaces that haven't been fully audited When one of these instances is publicly reachable without authentication...