Engineering Leadership Briefing · Optimem
Every time an engineer pauses — a meeting, lunch, a code review — the AI provider's prompt cache goes cold. The next message silently re-uploads the entire conversation at the full cache-write price. On Anthropic's 5-minute default TTL, this happens constantly, and it is invisible on your bill: it just looks like "AI got expensive."
We measured it on 2,676 real coding-agent sessions and replayed a single fix — summarize the context the moment the cache goes cold, then continue. This deck ends on the number a VP asked for: dollars saved per year, for your fleet.
The finding · measured, not modeled
Across 2,676 real sessions there were 4,351 cache-cold misses. Re-priced at today's 5-minute TTL, those sessions cost $26,277. Summarizing at each cold point instead of re-uploading brought that to $13,507.
Why it happens · the cache-cold tax
Providers cache your conversation so each new turn only pays for the cheap cache-read of prior context (~10% of base) plus the new tokens. But the cache has a Time-To-Live. On Anthropic that default is 5 minutes.
Step away longer than that and the cache expires. The very next message pays a full cache-write of the entire conversation — billed at 1.25× base, the most expensive token class there is. A long session that an engineer returns to a dozen times pays that tax a dozen times.
The fix is not "prompt less." It is: at the moment the cache goes cold, replace the raw history with a compact summary (~20% of its size) and continue. A guardrail (the "breakeven gate") only does this when it will actually pay off — so it never costs more than doing nothing. In the data it fired on 99.9% of misses and lost money on essentially none.
The ask · your fleet, your dollars
Set your fleet size and what a developer spends on Anthropic/Claude agentic coding today. The savings rate below is not a guess — it is the measured result for the TTL and summary assumptions you pick, read straight from the 9-cell sensitivity grid. The one number to replace with your reality is spend per developer; the percentage is empirical.
Robustness · the number holds
Skeptics attack the assumptions — the cache TTL and how well context compresses. So we swept both. Across the full 9-cell grid, savings never drop below 37% and reach 60%. There is no corner of the grid where this doesn't pay.
How to trust this · methodology
The data is real. 2,676 public coding-agent sessions
(TraceLab: ~665K LLM rounds of Claude Code and Codex traffic), plus corroborating
corpora with file-path fidelity and native ~/.claude logs. No
synthetic traffic — those were checked and excluded.
The pricing is the product's. Every round is
priced by the same rate table and cache multipliers as the Optimem gateway's
breakeven.go, test-pinned against its fixtures. If production pricing
drifts, these numbers drift with it — no separate spreadsheet.
The optimization is gated, not greedy. A miss is only summarized when the projected savings over the next few turns exceed the summarizer's own cost (the breakeven gate). It fired on 99.9% of the 4,351 misses and lost money on 2 of them. Downside is bounded to roughly zero.
The TTL regime is conservative. The corpus was collected under a longer effective TTL; we re-priced both the baseline and the counterfactual at today's 5-minute default, so we never credit the fix with savings from a stale cache assumption.
Caveats. Savings apply to Anthropic/Claude prompt-cache lanes (where the gateway optimizes today); OpenAI/Gemini long-TTL lanes carry a separate, smaller reactive gain plus a proactive-budget path. The headline is corpus-wide (subagents included); top-level sessions alone run higher (~54%). "Spend per developer" in the scenario is your input, not ours.