When an Agent pauses for several minutes after calling a tool, its cache may expire. This article compares Claude and GPT cache windows and explains how to calculate recovery latency and token costs.
Users rarely return immediately after an Agent calls an external tool.
They may be waiting for approval, waiting for a script that runs for 20 minutes, or simply stepping away from their computer. Resuming a conversation after a few dozen seconds may seem like little more than a short wait. The real question is whether the previously cached system prompt, tool definitions, and conversation history are still available.
Requesty’s article compares Claude’s roughly five-minute prompt cache with GPT’s roughly 30-minute cache, focusing on the cost of pauses during tool calls.
First, the boundary: this is neither a new Claude or GPT model nor an official benchmark. It is an analysis based on model routing and real-world inference costs.
The Cache Expires, but the Agent Is Still Waiting
The purpose of a prompt cache is straightforward: context that appears repeatedly does not have to be billed again as ordinary input tokens.
For ordinary chat, this usually means reusing prefixes across consecutive follow-up questions. Agents have a more complicated situation. A model issues a tool call, and the client waits for the tool’s result. If the tool runs for 40 seconds and the user takes another 10 seconds to reply, the full interaction has exceeded Claude’s roughly five-minute cache window.
The result is direct: by the time the session resumes, the cache may have expired. The Agent must reprocess the system prompt, tool schemas, and a portion of the conversation history. With a long context, that raises not only the bill but also time to first token.
GPT’s roughly 30-minute window provides a longer period in which to resume. After the same pause, Claude may have to recompute its prefix while GPT may still hit its cache.
These figures, however, should not be treated as permanent guarantees across every deployment. Cache rules can vary by API version, region, traffic pattern, and server-side implementation. The model described here is the one Requesty uses to explain the cost difference, not an SLA that requires no verification.
Five Minutes Versus 30 Minutes: More Than a Longer Lease
When people see cache duration, their first thought is often the cost of retaining the prefix. That is not quite accurate.
An Agent’s prefix often contains three layers:
- A long system prompt containing roles, rules, and business constraints.
- Tool definitions containing function names, parameter schemas, and descriptions.
- Conversation context containing previous messages, tool calls, and tool outputs.
On a cache hit, all three layers can be reused. Once the cache expires, there are three common ways to proceed:
- Resend the complete prefix unchanged. This is simple, but it raises both recovery latency and cost.
- Trim the history and retain only the recent messages needed for the current task. This lowers cost, but it may discard decision-making context.
- Compress the session into a summary and then continue. This shortens the context, but generating the summary requires an additional call and may omit constraints.
As a result, the difference between 30 minutes and five minutes is not merely how long the same prefix remains cached. It also changes how the Agent resumes a session.
Suppose a request contains 40,000 cacheable prefix tokens and the user pauses for two minutes after a tool executes. Claude may need to recompute the prefix, while GPT may still receive a cache hit. The factors that actually need to be measured are time to first token on the resumed request, total cost, and whether the tool result is still referenced correctly.
Requesty’s analysis directly connects prompt-cache duration with Agent interaction latency and inference cost. Its central scenario is not an abstract benchmark but a very specific interruption: the workflow pauses after calling a tool.
How to Calculate the Cost of a Pause
Comparing API list prices alone can lead to the wrong conclusion. At least three variables matter for an Agent product.
1. The Price per Cached Token
This determines the marginal cost of a repeated prefix.
2. Input Tokens That Miss the Cache
After the cache expires, how are the prefix tokens billed? If the application also trims or summarizes messages, the number of tokens that miss the cache will change as well.
3. Wait Time After the Tool Returns
This is the variable users actually perceive.
A simplified model can estimate the cost of one pause:
pause cost = uncached input tokens × uncached input price
+ cached tokens × cached input price
+ wait time × business latency weight
There is also an engineering cost to account for: whether context recovery requires rerunning formatting, routing, or summarization tasks.
For example, suppose the same 40,000-token prefix is reused 20 times. The following notation illustrates the cost structure:
all cache hits: 20 × 40,000 × C_cache
all cache misses: 20 × 40,000 × C_input
If C_cache is much smaller than C_input, the difference may show up primarily in recovery latency and user attrition. If the application also generates summaries, the summary calls must be added to the gap.
This formula does not require inventing a universal token price. Pricing can vary with the model, cache writes, input length, cache-hit behavior, and API version. In practice, the more useful approach is to derive three statistics from real request logs:
- P50, P90, and P99 tool-pause duration.
- Cache-hit rate for resumed requests.
- Input tokens, output tokens, and time to first token for each paused session.
Then bucket the pauses by duration: under 30 seconds, one minute, five minutes, and 30 minutes. This shows which interval produces the largest cost increase after the cache expires.
Different Workflows Need Different Cache Strategies
Short tool-call workflows and long human-approval flows cannot use the same strategy.
Short Tool-Call Workflows
Examples include querying a database, calling an internal API, or reading an image. The tool usually returns within a few seconds, and the user continues immediately.
These workflows benefit from:
- Keeping the prompt prefix stable to maximize cache hits.
- Avoiding arbitrary changes to the system prompt or tool schemas between requests.
- Trimming a small number of historical messages without breaking the tool-call chain.
Long Human-Approval Workflows
Examples include payments, publishing content, and merging code. Users may leave for several hours before confirming.
In these cases, it is more sensible not to retain the original context indefinitely, but instead:
- Persist approval status in the Agent’s external state.
- Rebuild the minimum necessary context when the session resumes.
- Retain approval records, object IDs, and critical constraints.
- Summarize long histories while allowing users to retrieve the original messages.
Client-side caching, message trimming, and session resumption are all useful, but none can replace a server-side prompt cache.
Client-side caching addresses repeated reads within the same process. Message trimming reduces context size. Session resumption preserves task state. None of them guarantees that the server will still recognize the previous prefix cache, and none can bypass the API’s specific cache-hit rules.
The routing layer therefore needs to know at least two things: whether the request uses the same cacheable prefix, and how much time has passed since the session was paused.
The Controversy Behind 394 Points on HN
The original article reached the Hacker News front page, where the page showed 394 points and 173 comments.
The debate focused on two issues.
First, can five minutes and 30 minutes represent real workloads? Many Agent tool calls pause for only a few seconds, while some approval workflows remain suspended for hours. Using two windows to explain every scenario is too coarse.
Second, should routing platforms handle cache expiration automatically? If users do not care which underlying model is serving them, can the provider automatically trim context, switch models, or rebuild a session after a long pause?
The problem is that automatic switching can also make results unpredictable. Users may suddenly find that the context or tool schemas have changed. A more reliable interface would return observable information rather than silently inserting a model: whether the cache was hit, how long the pause lasted, which resumption strategy was used, and the estimated cost.
This is where Requesty’s article is worth examining. It did not introduce a new caching mechanism; it placed routing, pauses, and billing on the same cost sheet.
What This Means for Agent Design
The scarce resource in an Agent product may not be tokens, but user attention. A tool that runs for 20 minutes is not inherently a problem. The problem comes when the user returns and must wait for the Agent to rebuild the state. The difference between five-minute and 30-minute caches will eventually appear in time to first token, the frequency of context compaction, and user attrition.
Routing platforms will likely absorb these underlying cache differences into session-level budgets. Users may choose between “cheap,” “fast,” and “long pause,” while the platform selects the model, trims context, and estimates the cost. The differences will not disappear entirely, however. Cache rules still need to be verified separately for each API version, region, and workload. Another shift will be that Agent pause duration will become a product metric rather than a number buried in engineering logs. Teams will need to answer not only whether the cache was hit, but how long users have to wait after they return before work can continue.
No comments yet — start the discussion