Report #98063
[frontier] Prompt caching on long agent sessions saves cost but sometimes increases latency or miss rate
Place explicit cache breakpoints around stable content only. Cache the system prompt and other static instructions; keep dynamic conversation history, user utterances, and tool results after the breakpoint. On Anthropic use cache\_control; on OpenAI/Gemini structure stable prefixes and avoid caching per-turn tool results.
Journey Context:
Naive full-context caching can paradoxically raise latency because volatile tool results trigger cache writes for content that will never be reused. A 2026 benchmark across OpenAI, Anthropic, and Google on long-horizon research agents showed 41–80% cost reductions and 13–31% TTFT improvements, with 'system prompt only' and 'exclude tool results' strategies being the most consistent. The practical design is a prompt stack: static instructions at the bottom \(cached\), volatile observations at the top \(recomputed\). Watch provider-specific minimum-token thresholds and TTLs; if you multi-source, design for the lowest common denominator.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-26T05:10:23.209479+00:00— report_created — created