The cost of a Claude Code task comes down to the number of turns, the share of input read from the cache, the output tokens (thinking included) and the model’s price. On Opus 5.5, the default model since v2.1.280, Anthropic estimates that typical workloads billed by token cost about 40% less than on Opus 5 at default settings. Across enterprise deployments, the Claude Code docs give an average of about $13 per developer per active day, with 90% of users staying under $30.
The model itself is covered in the Opus 5.5 article. Effort levels and subagent models each have their own article too.
What does a Claude Code task cost on Opus 5.5?
Every turn resends the whole conversation to the model. Anthropic’s post on task cost takes a task whose context grows from 20K to 120K tokens. Over 40 turns, it sends about 2.8M input tokens. With 90% read from cache, that input costs about $1.62. The same task in 25 turns comes to about $1.02.
The same post prices a typical session at API list prices, leaving out cache writes.
| Line | Tokens | Opus 5 | Opus 5.5 |
|---|
| Cache reads | 2M | $1.00 | $0.40 |
| Fresh input | 200K | $1.00 | $0.80 |
| Output | 60K | $1.50 | $1.20 |
| Total | | $3.50 | $2.40 |
With the same tokens, the drop comes from price alone and reaches 31%. The announced 40% also assumes that Opus 5.5 uses fewer tokens per task at medium effort, so it isn’t a 40% cut in the price of a token. Anthropic also warns that Opus 5.5 can spend more on a single answer, because it always thinks before it replies.
Why does the cache matter so much?
On Opus 5.5, a cache read costs $0.20 per million tokens, 5% of a fresh input token. The 2.8M input tokens from the example cost $11.20 with no cache, $1.62 at a 90% hit rate and about $0.99 at 96%.
For the main conversation, the cache lasts one hour on a Claude subscription, within your plan’s included usage. It drops to five minutes on an API key, a cloud provider or usage credits, and subagents get five minutes by default even on a subscription. On an API key, promptCacheTtl asks for one hour on the main conversation (v2.1.242 or later).
{
"promptCacheTtl": "1h"
}
A cache write costs 1.25 times the input price for five minutes and 2 times for one hour. According to Anthropic, at 120K tokens of context a five-minute write costs about $0.60 on Opus 5.5 and a read about $0.02. On an API key, a six-minute break turns your next read into a write.
You also pay for a new cache write when you switch models, when you turn on fast mode for the first time in a conversation, and after a compaction. On Bedrock, Google Cloud’s Agent Platform or a Claude apps gateway, changing effort does the same. Set these up when the session starts, then leave them alone.
When does /compact actually save money?
To move on to unrelated work, /clear empties the conversation and costs nothing. /compact is for when you want to keep the thread, and it costs one request that reads the whole conversation. According to Anthropic, compacting at 150K tokens costs about $0.25 with a warm cache, and each later turn saves about $0.025 in reads. A compaction pays for itself in about ten turns, so one right before you finish costs more than it saves.
/compact keep the failing test names and the schema change
With a cold cache, the same compaction reads everything again and writes it back to the cache. At 150K tokens on a five-minute cache, the input alone comes to about $0.75. Run it before a break, not when you come back. On the one-hour cache, idle compaction can handle that for you.
Which effort level costs the least?
Thinking is billed as output, at $20 per million tokens on Opus 5.5, five times the input price, and effort mostly sets how much of it you get. Anthropic’s example is high adding 20K thinking tokens across a task, which is $0.40. Ten retry turns at 100K tokens of cached context, with 10K output tokens in total, cost about the same, so high pays for itself as soon as it saves one retry.
Anthropic suggests medium for well-scoped work and high when medium stalls. Before you raise effort, give the model a way to check its work, such as a test or a build. A test run costs one turn, while higher effort adds thinking to every turn.
Which model should subagents run on?
A subagent that inherits the main model also inherits its price. Anthropic suggests moving down to Sonnet or Haiku for searches and for reading logs or test output, and keeping Opus 5.5 for writing code. For a mechanical edit across many files, keep Opus 5.5 and set effort to low.
---
name: log-reader
description: Reads logs and test output, then summarizes the errors
model: haiku
---
Read the log files you are given and return only the errors, with their file and line.
The CLAUDE_CODE_SUBAGENT_MODEL environment variable gives subagents a default model. A model set in a subagent’s definition wins over it, and the variable alone doesn’t change Explore or Plan. The opusplan alias splits the work the other way round. Opus plans in plan mode, then Sonnet carries out the plan, which puts the code edits on Sonnet. Each time you enter or leave plan mode, the model changes and the cache starts empty. Measure it on your own tasks before you make it your default.
How do I see what my session costs?
Run /usage, or its aliases /cost and /stats. The Session block lists input, output and cache tokens per model, with a dollar figure computed on your machine at list price. Since v2.1.251, a Prompt cache (main) line shows the share of input served from cache.
On a subscription, that figure isn’t a bill. /usage also shows your plan usage bars and recommendations there, and since v2.1.305 the f key applies some of them for you.
To measure what Opus 5.5 saves on your own work, Anthropic suggests running the same real task on Opus 5 and then on Opus 5.5, and comparing those numbers.
Sections 7.3 and 7.4 of module 7, Optimization and pro workflow cover when to run /clear and how to steer a /compact. Section 7.6 of the same module shows how to isolate an investigation in a subagent.