Claude Code Advisor Tool Triples /compact Costs by Breaking Cache

motonari728 · ghdev · 2026-08-22

A GitHub issue reveals a cost bug in Claude Code's /compact command. When the Advisor tool is enabled, the internal fork request uses a different tools array and system prompt, preventing it from reusing the prompt-cache prefix written by the main loop. This causes the entire conversation body to be re-processed as a cache write on every compaction. Benchmarks show a 3.5x cost increase (approx. 54k tokens re-billed) compared to disabling the Advisor. Setting CLAUDECODEDISABLEADVISORTOOL=1 restores cache hits.

Original post →

More from coding & agent

coding & agent channel →