When building and running coding agents with tools like Claude Code, OpenCode, Codex, Pi, and Kilo, developers quickly notice that API bills vary depending on usage patterns. Analyzing code agent traffic from October 24 to November 22, 2026, reveals that 23.1% of the total Claude bill went to rebuilding prompt caches that had expired while the developer was away. On GPT models across the same tools and window, that figure sat at 9.3%. Understanding why this discrepancy exists requires looking closely at default Time-To-Live (TTL) values, cache read multipliers, and the real financial cost of a brief pause away from your keyboard.
The Mechanics of Prompt Caching and TTLs
To see why a timer changes the economics of a coding agent, look at how a single session runs. On turn one, the agent sends the system prompt, tool definitions, and your first message. On turn twenty, it sends all of that again plus nineteen turns of tool outputs and diffs. Without prompt caching, every turn pays full input price on the entire growing prefix. With caching, you pay 1.25x once to write new tokens into cache, and 0.05x to read the cached prefix on every subsequent turn. In production, that brings Claude coding bills down to 16.7% of list price, achieving an 83% saving.
While the agent is looping on its own to run tests and edit files, requests arrive every few seconds. Each cache read resets the timer on both providers, so the prefix stays warm and you pay 0.05x over and over. The bill jumps when the agent stops and waits for you. If you read a diff or grab coffee for 8 minutes, Claude's 5-minute TTL expires and the next turn pays 1.25x across the entire conversation prefix, which is 25x what a warm read would have cost. GPT-6.1 Sol still has 22 minutes left on its clock and serves the read at 0.05x. Most coding tools never opt into Claude's 1-hour option at 2.0x writes. Across the 30-day window, OpenCode sent 0% of large Claude writes at 1 hour, and Claude Code used 1 hour on 2% to 10% across most routes.
Measuring the Expiration Cliffs
Measuring how often a continuing turn reads at least 90% of the prior prompt from cache, plotted against the time elapsed since the last request, reveals two entirely different cliffs for the two providers. On the Anthropic API, the full-hit rate sits at 98.4% between 4:45 and 5:00, then falls off a ledge to 6.5% at 5:15 to 5:30. Vertex mirrors it, dropping from 92.2% down to 5.0%. GPT-6.1 Sol on Azure holds 95.8% all the way to 27 to 29 minutes, hits 52.5% across minutes 29 to 31, and drops to 1.9% by 31 to 33 minutes, matching OpenAI's documented 30-minute floor.
{
"provider": "anthropic",
"default_ttl_minutes": 5,
"cache_read_multiplier": 0.05,
"cache_write_multiplier": 1.25
}
Bedrock runs the same 5-minute TTL on a slightly friendlier clock. Measured start-to-start, Bedrock's hit rate only falls to 54.6% at minute five. Measured from the end of the previous response to the start of the next request, it drops cleanly from 91.3% at 4:45 to 5:00 to 2.5% at 5:00 to 5:15. Anthropic and Vertex start the clock when a request begins, meaning slow reasoning turns eat into your 5 minutes, and turns running past 5 minutes expire their own cache, representing 0.19% of input spend today. After a 12-minute pause, GPT-6.1 Sol read the entire prefix on both OpenAI direct and Azure Sweden Central, then missed at 40 minutes. After 12 to 13.5 minutes, every Claude route tested had evicted the cache and billed a full rewrite.
Minutes Five Through Ten Cost More Than Overnight Breaks
Most engineers assume the big cache misses happen when you close your laptop overnight and resume a thread the next morning. Production data points to the exact opposite. On Claude, pauses between 5 and 10 minutes eat 8.0% of the entire coding bill. That single five-minute slice costs more than every break over an hour combined, which stands at 5.3%. Nearly half of all Claude pause losses happen within 15 minutes of the last message, and two-thirds happen within 30 minutes, totaling 15.2% of the bill against 0.8% on GPT.
Once a break passes 30 minutes, both caches are gone and the two curves converge to 7.8% on Claude and 8.5% on GPT. Main-agent pauses over 5 minutes happen at the same rate across session lengths on both families. For sessions lasting 15 to 60 minutes, the average is 1.1 pauses over 5 minutes. For 1 to 4 hours, it rises to 3.3. For 4 to 24 hours, it hits 5.9, and over 24 hours, it reaches 13.9 for Claude and 13.2 for GPT. Restricting the comparison to a single tool with persistent conversation IDs on both families, such as OpenCode, shows pause rebuilds took 30.6% of the Claude bill versus 11.3% on GPT.
Simulating Alternative TTL Strategies
Replaying each family's real sessions under different cache lifetimes, while holding prompts, gaps, and read multipliers fixed and assuming a 1.25x rebuild whenever a gap exceeds the TTL, shows how the curves shift. With a 30-minute default, Claude sessions lose 8.7%, which is identical to GPT's 8.7% and about 14% below Claude's measured 23.1%. If you put GPT on a 5-minute cache, its loss jumps to 35.6% because input tokens represent a larger share of GPT coding bills.
interface CachePolicy {
ttlMinutes: number;
writeMultiplier: number;
readMultiplier: number;
}
const claudeDefault: CachePolicy = {
ttlMinutes: 5,
writeMultiplier: 1.25,
readMultiplier: 0.05
};
Developers using autonomous or semi-autonomous loops need to account for these architectural differences when estimating infrastructure budgets. For further context on how coding workflows interact with LLM backends, you can review our notes on Claude Code sabotage: preliminary benchmarking analysis to understand additional operational overheads.
Key takeaways
- Default TTL configurations heavily dictate the cost profile of long-running coding agent sessions.
- Short pauses between 5 and 10 minutes generate a disproportionately large share of Claude cache rebuild expenses.
- Extending Claude cache lifetime to 1-hour options involves a higher write multiplier of 2.0x, which alters the cost-benefit equation.
- GPT models maintain a 30-minute floor that naturally absorbs short coffee breaks without triggering expensive cache misses.
Source and further reading: Claude 5-minute prompt cache vs GPT 30-minute cache: the cost of pauses.