After the Opus 5.5 Price Cuts, How Much Does a Claude Code Task Actually Cost? A Hands-on Guide to Saving Money and Boosting Efficiency
Calculate the cost of a task using list API pricing, then optimize spending through testing, effort levels, model selection, caching, and /usage—complete with two reusable templates.
How Much Does a Task Actually Cost: From List Prices to the Real Bill
Developers using Claude Code often want to know the total cost of completing a task—whether shipping a new feature, executing a dependency migration, or troubleshooting a production bug. The ultimate token consumption depends on how many turns it takes to finish the task and how much input and output are processed in each turn.
With the release of Opus 5.5, Anthropic introduced across-the-board reductions in API pricing. Before diving into specific cost-saving tactics, let's start with the official API list prices and calculate exactly how much an illustrative task costs in dollars.
1. The Task Billing Loop and Opus 5.5 Pricing
Under the hood in Claude Code, a task is essentially a continuous Agent loop: the model inspects the current context and conversation history, decides to call a tool (such as reading a file, running tests, or executing a search), reads the tool's returned output, and repackages all history alongside the new content to send back—repeating until the task is complete.
Each iteration constitutes a turn, and the total cost of a task is determined by four core factors:
- Turns: Every turn resends all conversation and file contents accumulated up to that point back to the model. The more turns taken, the larger the cumulative volume of input tokens processed.
- Cache Reads: A portion of the content resent on each turn is repeated text the model has already seen in the prior turn. Handled by the Prompt caching mechanism, this comes at a tiny fraction of the fresh input price.
- Output Tokens: This is the most expensive token tier, priced at 5x the cost of fresh input. The model's internal thinking process is billed as output tokens under the hood. Consequently, the more the model reasons before answering, the higher the output bill.
- Model Tier: The selected model directly sets the baseline price per token.
Under the official Opus 5.5 API pricing, rates per million tokens (1M tokens) are:
- Fresh Input: $4.00 / M
- Output (including thinking): $20.00 / M
- Cache Read: $0.20 / M (as low as 1/20th, or 5%, of fresh input pricing)
2. 40-Turn Benchmark Calculation: Actual Spend Across Different Cache Hit Rates
To see how these rates combine into a final bill, consider an illustrative task defined in the source material:
Assume the task starts with a 20K-token initial context (system prompt, rules files, and project skeleton); as the model continuously reads codebase files and tool outputs, session context grows to 120K tokens. Across the entire session, the average input sent per turn is roughly 70K tokens.
- Total input volume: 40 turns × 70K average per turn = 2.8M input tokens. Note: although the final context window reaches only 120K tokens, repeatedly sending the history each turn results in 2.8M cumulative input tokens processed.
- If all input were billed as fresh input: 2.8M purely fresh input tokens would cost $11.20 (2.8M × $4.00 per million = $11.20).
- At a 90% cache hit rate:
- Cache reads: 2.52M × $0.20 per million ≈ $0.50.
- Fresh input: 0.28M × $4.00 per million = $1.12.
- Total input cost: approximately $1.62.
- At a 96% cache hit rate:
- Cache reads: 2.688M × $0.20 per million ≈ $0.54.
- Fresh input: 0.112M × $4.00 per million ≈ $0.45.
- Total input cost: drops to approximately $0.99.
Next, assume the task generates an additional 60K output tokens (including code generation and hidden thinking reasoning): 60K × $20.00 per million = $1.20.
On Opus 5.5, output pricing is exactly 100x the cost of cache reads. The $1.20 spent on these 60K output tokens equals the cost of reading 6M cached tokens.
Combining this output volume with the previous input calculations, before accounting for cache writes:
- At a 90% cache hit rate: Input $1.62 + Output $1.20 = $2.82
- At a 96% cache hit rate: Input $0.99 + Output $1.20 = $2.19
If the same task converges in 25 turns through more targeted context organization and planning, total input shrinks to 1.75M tokens, reducing the input cost at a 90% cache hit rate from $1.62 down to $1.02.
3. Comparison with Opus 5: ~31% Savings at Fixed Token Usage, but Real Tasks Depend on Execution
In official comparative estimates, an illustrative session consisting of 2M cache reads, some fresh input, and a moderate amount of output cost $3.50 under Opus 5 pricing ($5.00/M input, $25.00/M output, $0.50/M cache reads); under Opus 5.5 pricing, the total cost for the same session drops by roughly 31%.
This ~31% figure strictly measures the difference in list pricing when both model generations process an identical volume and composition of tokens.
In real-world coding work, the dynamics are far more nuanced:
- Price-dimension reductions: Opus 5.5 cuts fresh input and output rates by 20%, while cache read pricing drops 60% (from $0.50/M to $0.20/M). For long, end-to-end development sessions with high cache utilization, the pure rate difference is even more pronounced.
- Workload-dimension shifts: Opus 5.5 enables Extended Thinking by default, reasoning more thoroughly before responding, which can increase output tokens; conversely, if it diagnoses and resolves issues earlier, it can reduce total turns and eliminate redundant cycles.
For a tightly scoped, trivial task where both models converge in roughly the same number of turns, your savings will largely reflect the raw price cut. However, on open-ended, complex multi-branch tasks, if the older model went down dead ends and triggered rework while the newer model completes the task faster, actual savings can exceed 31%.
4. Separating Billing Models: API Dollar Bills vs. Subscription Plan Limits
Understanding costs also requires distinguishing between developer billing models:
- Anthropic API Key users: Costs can be estimated using the API list prices above; when routing through third-party cloud providers, the respective platform's pricing rules apply. When input in long sessions maintains a high cache hit rate, the reduction in cache read pricing to $0.20/M represents the largest single drop on the bill (in the 2M cache-read example, this line item falls directly from $1.00 to $0.40).
- Pro, Max, and Team subscription users: Day-to-day usage consumes rate limits and context bars built into the subscription. Anthropic states that Opus 5.5's lower pricing is reflected in subscription limits, including cached context, providing roughly 25% more coverage compared to Opus 5.
- Terminal
/usagereadings: When running/usagein the Claude Code terminal, the dollar estimate displayed on-screen is computed locally by the client based on API list prices. For subscription users, this dollar figure serves only as a standardized benchmark of objective coding workload—it does not reflect actual credit card charges.
Hands-on Guide to Saving Money and Boosting Efficiency
Once you know where the money goes, the next step is eliminating unnecessary turns and output during task execution, while watching out for token-saving configurations that trigger rework.
For example, thinking tokens saved by lowering effort can easily be wiped out by a multi-turn retry cycle; the source material cites two illustrative costs that both land at roughly $0.40. The following strategies walk through practical tactics across test configurations, reasoning levels, model delegation, prompt trimming, and cache maintenance.
Strategy 1: Prioritize Automated Tests to Surface Errors Early
- When to use: Cross-module function refactoring, API redesigns, and business logic involving cascading dependencies.
- Concrete actions: When issuing execution prompts to the model, explicitly provide executable verification mechanisms—such as the project's existing unit tests, build commands, or API validation scripts. The checks should cover the actual call chains impacted by the change, such as client and backend interfaces, rather than merely the isolated function being modified.
- What changes / trade-offs: Running tests adds a tool invocation turn and its associated output. However, equipped with self-verification capabilities, the model catches failures early and self-corrects, cutting down subsequent troubleshooting turns. The key takeaway from the source material: eliminating a single unnecessary rework loop often saves more money than trimming a small amount of per-turn thinking.
Strategy 2: Adjust Effort Levels (Thinking Depth) on Demand
Effort governs the baseline allocation of resources the model devotes in each turn to reasoning, textual explanation, and tool invocations. Opus 5.5 supports low, medium, high, xhigh, and a session-only max setting.
- Scenarios and level selection:
medium(the daily starting point): Best for routine development tasks with clear boundaries and established reference implementations.low: Best for purely mechanical coding, such as bulk variable renaming or mechanically replicating known templates and type definitions across multiple files. These tasks require no deep trade-off analysis, and curbing thinking reduces thinking-related output costs.high: Enable this when the model hits the classic bottleneck undermediumof "only fixing the immediate surface layer of code." For example, in an API refactor, the model might update the backend handler and pass unit tests while missing frontend call sites—illustrating that the model only checked a single layer of dependencies. Raising effort prompts the model to trace more call sites before writing code.
- Concrete actions:
Run
/effort highin the terminal to apply the setting, and run/effort statusto inspect the current level. - What changes / trade-offs:
- Economic trade-off: Suppose setting effort to
highadds 20K thinking tokens across the entire task lifecycle, incurring an immediate cost of roughly $0.40 on Opus 5.5. A 10-turn debugging retry loop in a 100K cached context with 10K output tokens also costs about $0.40. Therefore, ifhighavoids just one such retry cycle, the extra thinking cost pays for itself. Conversely, blindly enablinghighon straightforward tasks thatmediumcan handle on its own simply generates unnecessary thinking expenses. - Crucial constraint: Before switching effort mid-session, factor in the cost of cache writes. Because reasoning parameters and system instructions form part of the prompt cache prefix, changing the effort setting immediately invalidates the existing cache, requiring full cache write fees on the subsequent request.
- Economic trade-off: Suppose setting effort to
Strategy 3: Configure a Model Ladder and Delegate Information Retrieval
Model tiers fix the baseline price of every token in a session, exerting an even greater cost impact than effort. Crucially, in multi-agent workflows, subagents inherit the parent model and its pricing unless explicitly overridden.
- Daily workhorse: Opus 5.5
- Role: Ideal for supervised day-to-day feature development, complex cross-file integration, code reviews, and follow-up bug fixes. Keeping a developer in the loop to inspect output and steer when drift occurs ensures rapid convergence.
- Stepping up: Fable 5.1
- When to use: Unattended, pattern-breaking, or multi-agent coordinated tasks. Examples include long-running unsupervised workflows, hard architectural problems with no existing patterns in the codebase to reference, or large-scale refactors coordinating numerous subagents.
- Switching rule: Don't wait for a third failure. If Opus 5.5 at
higheffort fails twice on the same core problem, the source material recommends switching to Fable 5.1 via/model; once the blocker is resolved, switch back to Opus 5.5. - Price differential: Fable 5.1 is priced at $10.00/M for input and $50.00/M for output—both 2.5x the rates of Opus 5.5. Cache read pricing is $0.25/M, 1.25x that of Opus 5.5. In long sessions heavily reliant on caching, the cost gap narrows; when generating large blocks of new code, the gap widens.
- Operational detail: Switching models invalidates cross-model cache reuse; the new model incurs a full cache write fee on turn one. Run
/compactto compress context before switching, or start a clean session and paste a distilled plan.
- Delegating down: Demoting to Sonnet or Haiku for pure information retrieval
- When to use: Delegating easily verifiable information gathering—such as global file traversals, log scanning, test output filtering, or locating symbol definitions across repositories.
- Important distinction: The source material recommends reserving primary code modifications for Opus 5.5. For mechanical modifications spanning multiple files, the recommendation is to keep Opus 5.5 as the main model and set effort to
low, executing mechanical edits at lower effort. - Concrete actions: Explicitly declare
model: haikuormodel: sonnetin custom subagent configurations, or set the global environment variableCLAUDE_CODE_SUBAGENT_MODEL. - Mechanisms and trade-offs: Subagents run in isolated context windows. Tokens spent reading files are billed to the subagent's session, returning a concise summary to the parent model and preventing raw retrieval dumps from bloating the main context. The trade-off: if a smaller model misinterprets search results, the parent model may chase false leads, ultimately running up expensive turns on the main model.
- Note: In some environments, the
opusplanworkflow (Opus plans, Sonnet writes code) inverts this logic of keeping the main model on code writing while delegating only retrieval. Thoroughly benchmark both approaches on your own codebase before making it a team default.
Strategy 4: Clean Up Legacy Instructions and Prompt Anti-Patterns (Prompt-Audit Findings)
As models evolve, legacy prompt patterns designed for older generations often become unnecessary cost drivers for newer models.
- When to use: Projects migrated from earlier versions,
CLAUDE.mdfiles filled with ceremonial rules, custom skills, or embedded integration code on the Claude Platform. - Concrete actions:
Run
/claude-api prompt-auditin the terminal to scan configurations and skills for hidden prompt anti-patterns. Simultaneously reviewCLAUDE.mdin the project root—official guidelines suggest keeping it under 200 lines. Run/mcpto inspect active MCP servers and disconnect any servers not needed for the current task. - Analysis of the 44-ticket prompt-audit benchmark: Anthropic conducted a controlled experiment migrating an internal customer-support benchmark (44 tickets) laden with legacy prompt overhead from Opus 4.8 to Opus 5.5.
- How the numbers were derived:
- Step 1: Upgrading the environment from Opus 4.8 (default effort) directly to Opus 5.5 (low effort) reduced overall benchmark costs by roughly 18% (per-ticket cost dropped from ~2.46¢ to 2.02¢, while decision accuracy rose from 88.1% to 90%).
- Step 2: Running
prompt-auditto strip out targeted prompt anti-patterns cut costs by an additional ~9% beyond the lower baseline, yielding a cumulative ~25% reduction against the original Opus 4.8 baseline (per-ticket cost dropped to 1.83¢, and accuracy edged up to 92.1%).
- What was eliminated: The audit removed "ceremonial rules" originally introduced to steer older models—such as mandatory six-step decomposition workflows, rigid scratchpad rules, forced verify-twice constraints, and conflicting configuration directives. In this benchmark, these rules had driven up output tokens and duplicate tool calls.
- Transferable takeaway: Do not treat 25% as a universal constant; view it as a signal. Audit your configuration rules to prune legacy boilerplate like "write a chain-of-thought scratchpad for every step" or "verify every edit twice," freeing the newer model from generating superfluous output and redundant calls.
Strategy 5: Maintain Cache Lifetime and Execute Targeted Compaction
Prompt caching is a primary driver in lowering input bills, but its prefix-matching architecture means certain actions break the cache prefix.
- Underlying cache mechanisms and billing details:
- Prefix matching: Caching only reuses context matching the prefix from the very beginning. As soon as an early part of the prompt changes, all subsequent context after the change is invalidated.
- Write costs vs. read costs: On Opus 5.5, reading from cache costs just $0.20/M, but cache writes are expensive. A 5-minute TTL write costs 1.25x fresh input ($5.00/M), while a 1-hour TTL write costs 2x fresh input ($8.00/M). Each successful cache hit resets its time-to-live at no extra charge.
- TTL differences: Subscription plans include a default 1-hour cache TTL (dropping to 5 minutes when falling back to usage credits); API developers have a default 5-minute TTL (with the option to pay a 2x write premium for 1 hour).
- Five scenarios that trigger cache rewrites:
- Idle timeouts: In API mode, stepping away for coffee for more than 5 minutes forces subsequent requests to rewrite the cache. In a 120K context, what would have been a ~$0.02 cache read immediately turns into a full cache write costing ~$0.60—in this example, a single write equals roughly 25 cache reads.
- Mid-session effort or thinking changes: Modifying these settings breaks the prefix match, forcing the entire conversation to be rewritten to cache.
- Dynamically adding or removing MCP servers: Modifies the tool definitions loaded at the beginning of the request.
- Switching models: The new model cannot share the previous model's cache and must build its own.
- Session compaction: Compaction rewrites history, establishing an entirely new prefix.
- Why long sessions get progressively more expensive per turn: Every turn must resend the complete history. At 20K context, a single-turn cache read costs roughly $0.004; when context balloons to 150K, reading the cache jumps to $0.03 per turn. Running 30 turns at that size costs $0.90 in cache reads alone (compared to just $0.12 at 20K). Useless stack traces from two hours earlier and long-closed file contents continue exacting a toll.
- Balancing
/clearvs./compact:/clear: Completely wipes context at $0 cost. Whenever the current task is wrapped up and you are pivoting to unrelated work, use/clear./compact: Generates a summary to preserve continuity, but compaction itself incurs a full request cost. For a 150K context, running compaction costs roughly $0.25 (reading long history, generating thousands of summary output tokens, and writing the shortened context into cache). Following compaction, subsequent turns save about $0.025 per turn in read fees—meaning, in this illustrative calculation, it takes about 10 subsequent turns just to break even on the compaction cost. If you only have one or two turns left to finish the task, running/compactcan increase overall spend.- Targeted compaction instructions: Generic compaction often drops subtle debugging details. Provide explicit guidance when running it, such as:
/compact preserve failing test case names and database schema modifications.
Strategy 6: Diagnose Anomalies with /usage and Establish Baselines Across 3–4 Real Tasks
Avoid drawing conclusions from a single toy example or blindly applying rules of thumb found online.
- Three core metrics to inspect in
/usage: Run/usage(or/cost) at the end of a task, focusing on three signals in the Session section:- Cache Share: Ongoing long sessions typically maintain high cache percentages; the 90% figure in the source is an illustrative calculation, not a universal target. If the cache share is abnormally low, check immediately for idle pauses, mid-session parameter changes, or dynamic MCP modifications.
- Output vs. Input Ratio: If you only tweaked a few lines of code but output tokens are noticeably higher than your typical tasks of this type, check whether effort is set too high or if the model got stuck in an iterative retry loop.
- Total Input vs. Final Context Size: If cumulative input processed is tens of times larger than the final context window, the task cycled through many turns. Review the session transcript to identify where the agent got stuck.
- Industry benchmark context: Enterprise deployment data published in official Claude Code documentation indicates that active developers spend an average of roughly $13 per active developer per day, with 90% of users spending under $30 daily. If an individual session significantly exceeds your usual task baseline, use the metrics above to inspect the root cause.
- A disciplined comparative testing workflow: Select 3 to 4 representative development tasks from your backlog (not Hello World exercises). Run each task to completion under Opus 5 vs. Opus 5.5, or across different effort configurations. Faithfully record turns completed, output token consumption, and dollar totals. Only empirical data gathered from your own codebase should inform your team's default configurations.
Practical takeaway
Scroll through the Markdown, then copy and adapt it to your team.
Loading Markdown…
Members can copy or download the full Markdown, and let their AI subscribe and ask.
Found this useful? Leave your email — every new explainer, the moment it's out. Unsubscribe anytime.
