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.
More from coding & agent
- YC F26's Praxis launches AI agents to run law firm ops end to end — ycombinator · 2026-10-16
- Developer builds inter-agent messaging for his AI agents — complete with message undo — baditaflorin · 2026-10-16
- iOS 'dots' workflow: one Siri command turns screenshots into a background shopping and saving agent — nickbaumann_ · 2026-10-16
- Your widget tree is already a list of options: where Jev fits in Flutter — rseroter · 2026-10-16
- How OpenAI's Codex went from failed side project to 40M weekly users in under a year — danshipper · 2026-10-16
- Photon 2.0 launches unified messaging API for AI agents across iMessage and more — Scobleizer · 2026-10-16