Quick answer
Compare tokens per completed task, then apply rates. Sonnet is cheaper per token and usually wins on routine edits. Opus can be cheaper overall on hard debugging or architecture work because it needs fewer attempts. Never compare token prices alone.
Measure it
- Pick a task you repeat weekly.
- Run it in each model with a fresh session and the same prompt.
- Record input, cache read, cache write, and output.
- Record whether the first attempt completed the task.
- Multiply by current rates and divide by completed tasks.
Where each wins
| Task | Likely winner | Why |
|---|---|---|
| Rename or small edit | Sonnet | Enough reasoning, lower rate |
| Test fix | Depends | Opus may avoid retries |
| Multi-file refactor | Opus | Fewer failed attempts |
| Code review | Sonnet | Output-bound, cheaper rate |
| Architecture | Opus | Reasoning quality matters |
Use both
Explore with Sonnet, then escalate the hard part to Opus. That pattern usually beats picking one model for everything.
UsageAtlas splits Claude Code usage by model, so the comparison uses your tasks rather than a benchmark.
When the stronger model pays
| Task | Cheaper model | Stronger model |
|---|---|---|
| Rename a symbol | Usually fine | Wasteful |
| Write a test suite | Fine with a spec | Better coverage |
| Debug a race condition | Often loops | Saves attempts |
| Explain unfamiliar code | Fine | Better synthesis |
| Large refactor | Risky | Worth the rate |
The decision is not the rate per token but the number of attempts. A strong model that solves a hard bug in one pass is cheaper than three passes on a cheap model, and much cheaper than a bad fix you have to review.
UsageAtlas records the per-model split, so you can check whether the strong model is reserved for hard tasks. See Claude Code tokens by model.
Questions, answered
Is Opus always more expensive?
Per token yes. Per completed task, not always, because it may need fewer turns.
Can I switch models mid-session?
Yes. The context stays, and the new model's rate applies from that point.
Which model should be the default?
Sonnet for most work, with Opus reserved for tasks where a failed attempt is expensive.