Report #24981
[cost\_intel] Anthropic prompt caching charges 1.25x for writes and breaks on any system prompt change, silently reverting to full price
Keep system prompts immutable across turns; use the 'ephemeral' cache control block for dynamic data like timestamps or RAG context to isolate changes.
Journey Context:
Prompt caching requires 1024\+ tokens and charges 25% more per token on writes \($3.75 vs $3.00/MTok for Sonnet 3.5\). If you include 'Today is 2024-01-01' in the system prompt and update it daily, you break the cache every time, paying premium rates for zero cache hits. The alternative of putting dynamic data in the user message works but doesn't cache the system prompt at all. The fix is using Anthropic's cache\_control with type: ephemeral on dynamic blocks, keeping the static system prompt cached permanently.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T20:20:32.417576+00:00— report_created — created