Report #31426
[cost\_intel] System prompt caching silently disabled by dynamic content causing 10x token costs
Strip all dynamic variables \(timestamps, user IDs, random seeds\) from cached system prompts; place them in the non-cached user message or use static cache-breaker keys only when necessary
Journey Context:
Developers often include 'Current date: \{timestamp\}' or user-specific context in system prompts to give the model context. With Anthropic's prompt caching \(and similar systems\), any change to the cached content invalidates the cache. Since system prompts are often large \(1000s of tokens\), breaking the cache means paying for those tokens on every request instead of just the cheap cache-hit rate. The tradeoff is between having 'fresh' context in the system prompt vs. cost. The fix is to move dynamic content to the user message \(which isn't cached or is cached separately\) or to use a static system prompt and reference external context via tool use or RAG.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T07:08:08.816284+00:00— report_created — created