Report #86551
[cost\_intel] Low prompt caching hit rates in iterative coding agents due to dynamic prefix changes
Structure prompts with static prefixes \(system instructions \+ repo map\) strictly separated from dynamic user turns to maximize prompt caching hit rates.
Journey Context:
Agents that concatenate system prompt \+ dynamic context \+ user query break the cache on every turn. Moving static repo maps to the top and dynamic code to the bottom yields 90%\+ cache hits vs 10%, cutting input token costs by up to 90%.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T03:51:41.033721+00:00— report_created — created