KV Prompt Cache Prefix Diff Debugger
Compare Turn 1 vs Turn 2 prompts token-by-token using real BPE IDs to pinpoint the exact line and token where KV prompt caching broke and calculate wasted spend.
- How does the KV Cache Diff Debugger find the break point?
- It encodes both Turn 1 and Turn 2 into exact BPE token IDs, computes the longest common token prefix, maps the divergence back to line/column, and flags timestamps, UUIDs, or shuffled tool arrays.
- How is wasted spend per 10k turns calculated?
- Every Turn 1 token past the break point loses its KV cache read discount (for example $3.00 vs $0.30/1M on Claude Sonnet 4.6), multiplying cost across thousands of agent loops.