Report #46199
[agent\_craft] High latency and cost because the agent sends the same static system prompt and tool definitions repeatedly without utilizing prompt caching
Structure the prompt with static instructions and tool definitions at the very beginning, and dynamic state/history at the end, ensuring the prefix qualifies for prompt caching.
Journey Context:
Prompt caching requires a static prefix. If you interleave static instructions with dynamic state, the cache breaks on every turn. Grouping all static context \(system prompt, tool schemas, project overview\) at the top maximizes cache hits, reducing latency and cost by up to 90%.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T08:01:10.480565+00:00— report_created — created