Claimed result
- Author: rari (@0xwhrrari, ~18.7k followers), writes practical breakdowns of AI agents, workflows and production systems (Substack newsletter).
- No personal financial result: it's a measurement and configuration method for agents built on Claude Sonnet 5.5 and Opus 5.5, with API prices "as of October 3, 2026" and numerical examples that are explicitly illustrative.
- Thesis: "Your agent does not ship tokens. It ships completed tasks." Copying an old config onto the 5.5 models can make everything slower, more expensive, or return a 400 error.
Proof: framework. Prices and API behaviour quoted from Anthropic's documentation; the cost examples ($0.06, $0.20, $0.14) are made up to make the rule testable, not measured. The original's tables and code blocks aren't in the downloaded text.
The key idea
The number that should decide your stack is cost per verified task (dollars spent ÷ tasks that pass the check), not price per million tokens. The setup the author would build:
TASK → SONNET 5.5 → CHECK → OPUS 5.5 IF NEEDED → VERIFIED RESULT, with effort as a routing lever and cache + a usage ledger under the whole loop.
The real cost includes tasks that never pass, retries, tool calls, cache writes and the long failures in the "hard tail".
Step-by-step playbook
1. Define a real check for each kind of task
- The check is not a vague thumbs-up after one impressive answer.
- Coding: the test that would block the merge.
- Extraction: compare required fields against a labeled set.
- Research: record whether the cited source actually supports each claim.
- Count the cost of tasks that never pass, not just the nice examples in your demo.
- Inspect the hard tail separately: if the cheapest setting handles 90% of requests but burns half the budget on the remaining 10%, the average hides exactly the part of the workflow that needs a different model.
- The vendor's published tests are their tests: your architecture needs your numbers.
2. Read the 5.5 price sheet carefully (as of October 3, 2026, standard API rates)
- Both models: 1M-token context window and 128K-token maximum output. These are ceilings, not a reason to fill them.
- Opus costs twice as much as Sonnet for fresh input and output.
- Cache reads cost the same on both: $0.20 per million tokens. That doesn't make Opus as cheap as Sonnet (it still pays more for new input, output and cache writes), but in a read-heavy session the gap shrinks.
- Output = 5× the fresh input price on both models.
- From the author's example you can derive Opus 5.5 prices: ~$4/M fresh input (10M fresh tokens = $40), ~$5/M for a five-minute cache write (200K tokens = $1), hence ~$20/M output; Sonnet roughly half on input and output.
- Watch the marketing figures: "40% less than Opus 5" is an estimate of typical run cost. Opus 5.5's fresh token prices fell 20%, its cache-read price 60%: related numbers, but not interchangeable.
3. Treat effort as a routing decision, not a quality slider
- Sonnet 5.5 supports low, medium, high, xhigh, max. Defaults: high on the API, medium in Claude apps (per Anthropic). Opus 5.5 defaults to medium on the API. The levels don't mean exactly what the same words meant on previous models.
- The author's starting map (a hypothesis, not a universal hierarchy): | Level | When | |---|---| | Sonnet low | narrow, latency-sensitive requests with a cheap check | | Sonnet medium | well-specified coding and routine multi-step work | | Sonnet high | when the medium run fails a real check, or the task has a demonstrated complexity pattern | | Opus medium | ambiguous, cross-file, long-horizon work where Sonnet keeps circling the problem | | xhigh / max | only after your evals show a gain worth the extra time and tokens |
- More effort is no proof of a better outcome: in Anthropic's reported FrontierCode results for Sonnet 5.5, xhigh scored above max. The footnote explains that at max the model more often launched extra code review work; in two examined cases this led to a timeout or edits beyond the task's scope. The problem wasn't "it didn't think enough" but effort spent in the wrong place: if the agent already passes its checks, extra review turns become cost and a source of new mistakes.
- Don't set
max_tokenslow and call it optimization: the limit covers thinking and visible output. Cutting it mid-task means buying a truncated answer and a second run.
4. Run a small sweep before you invent a router
- Take 10–30 tasks you actually care about: easy work, ambiguous work and the annoying failures from your logs. Give each a verifier (tests, a structured comparison, a known answer or a human rubric written before the run).
- The original includes the smallest useful API probe (official Anthropic Python package,
ANTHROPIC_API_KEYenvironment variable): one isolated call without caching (so zero cache reads/writes expected) that logs the usage fields; you run it on each model and effort level against the same task and attach your own pass/fail check. It isn't a full agent benchmark. - In a real agent, sum usage across all API calls under one task ID, including retries and tool calls. Count a pass only when the verifier says the job is finished. Compare total dollars per pass before choosing your default.
- Rules for an honest test:
1. freeze the task set and the verifier before comparing configs;
2. same tools, permissions, context and output requirements for every candidate;
3. record pass rate, total spend, cost per pass, latency and the longest or most expensive failures;
4. count
stop_reason: "max_tokens"as an incomplete attempt, not a cheap success. - The probe uses an 8K output cap for a single call: don't copy it into a long coding agent. Anthropic recommends much more headroom for agentic work because hidden thinking counts toward the same limit. Set the cap for the work, then control spend with effort, caching and a task budget.
5. Cache the stable part of the job
- Agents keep re-sending the same system instructions, tool definitions, repository map and prior conversation. If that prefix is stable, prompt caching changes the economics more than a minor prompt rewrite.
- The author's example: 200K cached tokens read 50 times = 10M cache-read tokens → at $0.20/M = $2 on either 5.5 model. The same 10M tokens as fresh input on Opus 5.5 = $40. The first five-minute cache write of 200K tokens = $1 more. That's the prefix cost only: new input, output, other writes, TTL expiry and cache misses add to the bill.
- Practical rules:
- on the Claude API caching must be opted into: top-level
cache_control={"type": "ephemeral"}or explicit breakpoints (the probe does neither, so its cache counters stay at zero); - stable instructions and tools first, before the changing request;
- keep the shared prefix identical across turns; verify real
cache_read_input_tokens; - switching models = a new conversation budget: the cache is per model, an Opus request can't read the prefix Sonnet just cached;
- don't change top-level effort on every turn: it changes the rendered prompt and invalidates cached prefixes. On supported models a per-message effort change can preserve the earlier cache, but it needs Anthropic's beta header and isn't the same as changing the top-level
output_config; - Sonnet 5.5 in
between_toolsmode: effort can't change mid-conversation; - don't infer a cache hit from a fast response: read the
usageobject, which separates fresh input, cache creation and cache reads; - you need at least 512 tokens in a cacheable prefix: a tiny system prompt won't produce the savings in the example;
- default TTL five minutes, which fits a fast tool loop. A one-hour write costs more: it only makes sense if real sessions often pause long enough to miss the five-minute window. Measure those gaps before paying for the longer TTL.
6. Escalate after evidence, not anxiety
- Most teams build the router backwards: classify a task as "hard", send it to the expensive model and never learn whether the cheap path would have passed.
- Use the verifier as the routing signal. The check (test suite, schema validation, known answer, reviewer) must explain what failed. "The answer feels weak" is a poor signal; "the changed endpoint fails two integration tests" is useful.
- Don't repeat the identical prompt: give the next attempt the failed check, the relevant artifacts and a specific instruction to close the gap. Cap the ladder so an agent can't burn its budget on a task that needs a human decision.
- A Sonnet high retry can be tested in the offline sweep; keep it in the live route only if it lowers cost per verified task. There's no reason to make every failure pay for two Sonnet runs before Opus. The model switch itself can break a cached prefix: account for it.
- The crossover (illustrative example): | Scenario | Sonnet attempt cost | Sonnet pass rate | Opus rescue | Average cost per finished task | Verdict | |---|---|---|---|---|---| | A | $0.06 | 80% | $0.20 (1 task in 5) | $0.10 | beats Opus on everything ($0.20) | | B | $0.14 | 50% | $0.20 (1 in 2) | $0.24 | Opus-first is cheaper and faster | The ladder only earns its place if the saved Opus calls outweigh failed Sonnet attempts, cache misses and added latency.
- A middle path: Anthropic's beta advisor tool. Sonnet keeps running the task and asks Opus for help on a difficult decision instead of handing over the whole job. Not automatically cheaper: log how often Sonnet consults it, what those calls cost and whether they lift the final pass rate; if the executor rarely asks, the advisor is an unused feature. On the 5.5 models the advice comes back encrypted to the client: evaluate the resulting work, don't pretend you can audit the advice text.
7. Four leaks that raise the bill before model choice matters
- Output that keeps growing: output costs 5× fresh input, and a long answer comes back as context on later turns. Ask for the artifact and a short completion note, not a narrated transcript of every step. Hidden thinking is billed as output, so a terse final answer alone won't fix an effort problem. Don't suppress the evidence you need to verify the result.
- Images larger than the task needs: Sonnet 5.5 processes higher-resolution images than older releases, so more image tokens. If the agent only needs a button label or one paragraph, crop or resize; if it needs a dense chart or tiny UI details, keep the resolution and measure the cost.
- Context nobody uses: tool definitions, stale logs, old search results and a sprawling CLAUDE.md follow every request. Durable rules go in a short, stable prefix; transient evidence near the task that needs it. Trimming must not delete facts that are still needed.
- Interactive pricing for work nobody is waiting on: the Message Batches API discounts input and output by 50% on both models. Useful for offline evals, document backfills and async jobs; not a replacement for a live tool loop where a person is waiting for the next step. The common principle: remove work the task doesn't need before buying more intelligence or lowering effort until quality breaks.
8. Migration traps that turn a saving into a 400
- Opus 5.5 thinking is always on. Remove
thinking: {"type": "disabled"}and old fixedbudget_tokens; control depth withoutput_config.effort. - Forced tool choice fails on both 5.5 models:
tool_choiceanyandtoolreturn a 400. Useauto, say when the tool should be used and validate the tool result in your own code. - Thinking blocks are not text blocks: read content by type, not
content[0]. In tool loops, return thinking blocks unchanged with the assistant turn. - Your UI may look silent: on Opus 5.5, between-tool progress can arrive in thinking blocks that are empty at the default display setting. If you used to show those notes to users, request a supported thinking display mode and render by type, otherwise the agent is working while the interface looks frozen.
- Old computer-use tool versions can fail: check the current version before migrating a browser/computer agent.
- A smaller
max_tokenscan cut off work: thinking is included even when the text is hidden. - These are API behaviour changes, not prompt-writing tricks (Opus and Sonnet migration guides).
9. Put the contract in Claude Code, not in your head
- In Claude Code
/modelpicks the model and/effortthe level: check the active settings before comparing sessions; the Sonnet API default doesn't reliably describe what your session uses. - The original provides a reusable CLAUDE.md block (to adapt to the project's commands) that makes success and failure visible: a bounded definition of "done" and a requirement to show the evidence. It won't make every run cheap, but it lets you compare a Sonnet-first workflow with an Opus-first one on the same tasks.
- The task message must be specific: "fix the payments code" versus a job an agent can actually finish. The contract gives the verifier something concrete to inspect and the model a reason to stop: an open-ended "review until perfect" turns a passing change into another paid loop.
- Long projects: keep the checklist in a file that survives compaction. Subagents: the lead agent inspects the evidence before accepting their reports. If you only asked for ideas, tell Claude not to start building. These are workflow boundaries, not "be smarter" prompts.
The setup to ship first (the author's checklist)
- Pick 10–30 real tasks and define a check for each.
- Sweep Sonnet 5.5 at medium and high, then Opus 5.5 at medium.
- Log fresh input, output, cache writes and reads, latency, retries and pass/fail per task.
- Keep the stable prefix cacheable and confirm hits in usage.
- Route only the failures upward, with their evidence attached.
- Revisit the ladder when the workload changes: a saved benchmark isn't a permanent truth. If the difficult 10% always goes from Sonnet failure to Opus success, consider routing that recognizable task class straight to Opus; if Sonnet high passes the same cases for less, keep them there. "A router is a measured policy, not a permanent opinion about which model is smarter."
Tools and costs
| Item | Price / limit (October 3, 2026) |
|---|---|
| Cache read (Sonnet 5.5 and Opus 5.5) | $0.20 / M tokens |
| Opus 5.5 fresh input | ~$4 / M (derived from the example: 10M = $40) |
| Opus 5.5 five-minute cache write | ~$5 / M (200K = $1) |
| Output | 5× fresh input (Opus ~$20 / M) |
| Sonnet 5.5 | half of Opus on fresh input and output |
| Max context / output | 1M / 128K tokens |
| Minimum cacheable prefix | 512 tokens; 5-minute TTL (1 hour at extra cost) |
| Message Batches API | −50% on input and output (async jobs only) |
| Opus 5.5 vs Opus 5 price drop | fresh tokens −20%, cache read −60%, typical run "−40%" (estimate) |
| Tools | Anthropic Python SDK, Claude Code (/model, /effort), beta advisor tool |
Limitations
- The cost examples are illustrative, not real measurements: the author says so explicitly.
- Prices and behaviour are specific to Claude 5.5 as of October 3, 2026 and change often; the per-million prices here are partly derived from the author's examples.
- The original's tables and code blocks (full price sheet, API probe, CLAUDE.md block, task example) aren't in the downloaded text: their purpose is described here, not their literal content.
- The approach needs reliable verifiers: for creative or judgment tasks the check is a human rubric, more expensive and less repeatable.
- The author promotes his own newsletter and Telegram.