How Much Do Prompt Caching and Reasoning Tokens Change Monthly Agent Bills?
Across multi-step coding and research agent workloads, enabling prefix prompt caching at a 90% hit ratio reduces input-heavy 8-step agent bills by 74% to 83%. Conversely, enabling intensive reasoning mode multiplies billable output tokens by 2.2x to 3.8x, shifting 35% to 55% of total expenditure onto output rates.
Standard token calculators treat every API request as an isolated single-turn completion. Production software agents operate differently: an automated pull-request reviewer or customer operations workflow inspects schemas, executes search tools, parses JSON responses, and loops 5 to 15 times per ticket. Every iteration resends the static system prompt, tool definitions, and conversation history.
Exact Mathematical Formula Used in This Simulator
For an agent executing N sequential steps per task with shared prefix context T_ctx, cache hit ratio h, fresh per-step observation tokens T_fresh, visible output tokens T_out, and reasoning multiplier M_think, per-task expenditure is computed as:
Cost_Task = N * [ ((T_ctx * h) / 1,000,000) * Rate_CacheRead + ((T_ctx * (1 - h) + T_fresh) / 1,000,000) * Rate_Input + ((T_out * M_think) / 1,000,000) * Rate_Output ] + Amortized_CacheWrite_Overhead
Cache writes occur when a cold prefix is first stored or after an idle Time-to-Live (TTL) window expires (typically 5 minutes for standard ephemeral caches, billed at 1.25x base input on Anthropic explicit-cache tiers and 1.0x on automatic prefix caches). Our formula amortizes prefix writes across warm burst sessions.
Reference Workload Scenarios (Priced on Claude Sonnet 5.5 — $2/$10 per 1M)
The table below compares three common 500-task production patterns—showing why high-frequency warm queues benefit dramatically from prefix caching while sparse cron schedules suffer from cold-cache write overhead:
| Workload Profile (500 Tasks) | Avg Steps | Cache Hit % | Uncached Cost | Cached Cost | Net Cache Impact |
|---|---|---|---|---|---|
| Support Triage Agent (24K KB Prefix, 1.0x Non-Reasoning) | 3.0 | 85.0% | $78.80 | $22.48 | -71.5% |
| Repo Refactoring Agent (55K Repo Map, 2.2x Reasoning) | 8.0 | 90.0% | $489.42 | $121.51 | -75.2% |
| Sparse Cron Agent (55K Prefix, 1 Job / 7 Mins — Cold TTL) | 1.0 | 5.0% | $61.18 | $71.28 | +16.5% (TTL Loss) |
1.25x cache-write surcharge, zero subsequent reads make caching 15%–20% more expensive than uncached calls. See our Prompt Cache TTL Warming Guide for micro-batch scheduling fixes.
Worked Engineering Scenarios
Scenario A: SaaS Customer Operations Triage (15,000 Tickets/Month on Gemini 4 Hydrogen)
A B2B helpdesk loads a 24,000-token policy manual and 18 tool schemas on every ticket ($1.50/1M input, $0.075/1M cached read, $7.50/1M output). Each ticket averages 3 model turns, 450 fresh tokens, and 320 output tokens without extended reasoning. Without caching, re-reading context across 15,000 tickets costs $1,758/month; at an 85% cache hit rate, monthly spend drops to $515/month.
Scenario B: Autonomous Code Review Pipeline (6,000 PRs/Month on Claude Sonnet 5.5)
Each pull request triggers an 8-step agent loop over a 55,000-token repository index with a 2.2x reasoning token multiplier ($2.00/1M input, $0.10/1M cached read, $10.00/1M output). Even with 90% cache hits cutting uncached costs from $5,873 down to $1,458/month, the 8,448 billable output + thinking tokens per PR account for 35% of total spend. Delegating initial file-discovery steps (65% of turns) to Claude Haiku 5.5 cuts the monthly invoice to $559/month (read the Hybrid Routing Architecture blueprint).