Report #44096
[cost\_intel] Prompt caching discount failing silently due to dynamic timestamps in system prompt
Keep system prompt and tool definitions static across requests; move timestamps, user IDs, or session metadata to the user message or headers, never the cached prefix.
Journey Context:
Anthropic's prompt caching requires the prompt up to the cached boundary to be byte-identical. Developers often inject 'Current date: 2024-01...' into the system prompt, breaking the cache prefix and causing full price charges \(10x cost increase\) with no error message. The solution treats the system prompt as a static template; all dynamic data belongs in the user turn or after the cached breakpoint.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T04:29:09.821067+00:00— report_created — created