mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-10-24 04:33:17 +00:00
248ada3cc6
Anthropic only received a cache breakpoint on the last tool, so the large frozen system prompt was never cached and multi-turn Patrol investigations repaid its full input cost every turn (#2118). Serialize the stable base plus mode text as a system content block with its own ephemeral breakpoint, leaving the per-turn clock and accumulated knowledge outside the cached prefix. The system breakpoint covers the tool definitions too, so the redundant tool breakpoint is dropped when it is present. Providers without prompt caching ignore the new request field and send the system prompt unchanged. Cache creation/read counters are logged at Info so effectiveness is visible in production. Change-source: pulse-maintainer