Daniel Van den Berghe at Requesty looked at 30 days of coding-agent API traffic. A prompt cache lets the provider reuse the part of a request it already processed, including the conversation so far. When that cache expires during a break, the next request can pay to process the whole history again.

  • Rebuilding after pauses accounted for 23.1% of Claude spending and 9.3% of GPT spending in Requesty’s sample. Breaks of five to thirty minutes drove nearly all the gap.
  • When Requesty replayed both sets of sessions with the same 30-minute cache lifetime, both came out at 8.7%. That was a simulation, not a change deployed to customers.
  • In live tests on Anthropic direct and Vertex, switching an active five-minute cache to one hour forced a full rewrite at the higher rate. Setting the longer duration can itself cost money.

If you pay per request, compare costs over real sessions with time to read diffs and wait for builds. Caveat: These are Requesty’s API billing figures, not a cost comparison for Claude Code subscriptions or a test of which models code better.

The 133-comment thread on Hacker News added details about subscriptions and how people handle idle sessions.

What the thread adds

  • Aurornis — “On a subscription plan (not API requests) Claude Code defaults to 1-hour cache duration for the main conversation and 5 minutes for subagents.” 8cvor6j844qw_d6 and bensyverson raised the same billing distinction. Claude Code’s docs limit that one-hour default to usage included in the plan.
  • Wowfunhappy — “Even in the course of active work, many commands—compiling, running tests, etc—take longer than five minutes to complete.”
  • cardboard9926 — “It’s actually builtin pi, see cache warming”. The reply links to Pi’s settings reference, which describes when Pi pays for a refresh.
  • extr — “If the nature of your work is such that every time you return to the window the 5m cache is expired, bump it up.” They suggest putting the timer in the status line so you can tell.

From a 133-comment thread sampled in HN’s own ranking, with pseudonymous handles and no per-comment scores; it isn’t a consensus.