ELSEIF
Your brief EB
303 stories from 73 feeds 78 clusters Refreshed 8 minutes ago next pull 20:35

TECH Signal 407

Your Agentic Workflow's Cache Keepalive Costs 8x Too Much (v2: the interval frontier)

Measured across four LLM providers, the common practice of pinging prompt caches every 30 seconds costs roughly 8x more than necessary, with a 4-minute interval being the economically optimal setting.

WHY IT MATTERS

If you run agentic workloads that pause between requests for builds, tests, or human approvals, your cache keepalive interval is likely burning money for no benefit. The decision of whether to keepalive at all depends on both the provider and the length of your pause window, and getting it wrong is a real line item at agent scale.

Written by elseif from the cluster below · every claim links back to a source

The three things worth knowing

01

The 30-second keepalive interval is folklore; measured economics show 4 minutes is the right interval, cutting keepalive spend by about 8x.

02

Keepalive only pays when your agent's pause is longer than the provider's cache eviction point but shorter than its break-even horizon; outside that window it is pure waste.

03

Anthropic and OpenAI yield real cost savings from keepalive, while DeepSeek and Gemini only buy latency improvement, not money savings.

THE READ

What elseif makes of it.

ORIGINAL ANALYSIS

The core finding is that the widely adopted 30-second keepalive ping interval is roughly 8x too aggressive. A keepalive works by re-sending the exact conversation prefix on a timer to refresh the provider's cache TTL, so the follow-up request after a pause still gets the discounted cache-read price instead of paying full input cost and full prefill latency. Each ping costs the cache-read price, which is about 10% of the normal input price. The author measured this across Anthropic, OpenAI, Gemini, and DeepSeek with idle gaps out to forty minutes and ping intervals out to fifteen, running three independent timestamped runs per configuration.

The economics are governed by a clean rule: keepalive pays only when your agent's pause falls in the window between the provider's eviction point and its break-even horizon. If the pause is shorter than eviction, the cache would have survived anyway and the pings were wasted. If the pause is longer than break-even, you spent more on pings than a single re-prefill would have cost. On Anthropic and OpenAI, the savings inside that window are real. On DeepSeek and Gemini, keepalive buys latency improvement but not cost savings, because the re-prefill cost is low enough that pinging never recovers its own spend.

Provider retention behavior differs sharply and matters for planning. Anthropic evicts hard at its documented 5-minute TTL with no grace period. DeepSeek is gone by 10 minutes. OpenAI outlives its documented 5-to-10-minute window, staying half-warm at 20 minutes before going cold by 30, but the author warns this is a provider-specific bonus you cannot plan around. Google never converges to a clean warm-or-cold state, hovering between 33% and 83% hit rate at every gap, which looks like a routing lottery rather than a deterministic retention curve. The safe default assumption is the shortest documented TTL in your provider fleet, minus a margin.

The keepalive mechanism itself works universally: wherever a baseline drops, the keepalive holds the prefix at 100% warm. The question is never whether it functions but whether it pays. The author corrected their own earlier conclusion that OpenAI never evicts; it does, they simply had not measured long enough. That distinction between sticky and slow is what determines whether keepalive ever breaks even on a given provider. The practical takeaway for an engineer building agents is to set the interval to roughly 4 minutes, confirm your pause windows actually fall inside the provider's save zone, and skip keepalive entirely on providers where it only buys latency.

This was carried by a single feed, so the findings have not been independently corroborated by other sources in this dataset. The author credits CacheWise, a study of KV-cache management for coding agents presented by Haiying Shen and Simon Peter at AgentSys in Bellevue, as the inspiration. The server-side trace analysis from that work identified the same problem from the serving side: agent sessions reuse enormous prefixes and naive eviction wrecks them. This post addresses the complementary client-side question of what an agent builder can do without waiting for providers to change their cache management.

Written by elseif from the cluster below · checked for specifics the sources never contained

THE CLUSTER

Same story, 1 feed.

ORDERED BY FIRST SEEN
Lobsters Your Agentic Workflow's Cache Keepalive Costs 8x Too Much (v2: the interval frontier) Open ↗