AgentGuard®

Which /autocompact setting would have saved you tokens last week?

Free. One command. It runs on your computer and reads your last 7 days of Claude Code sessions.

npx agentguard-burn compact-replay

Run it in the terminal on the computer where you use Claude Code.

See a real result

Nothing is uploaded: Burn reads the Claude Code sessions saved on your computer and keeps the numbers there. An optional anonymous install count sends no usage. What it sends.

What it tells you

Example: one developer's last 7 days, measured Oct 18, 2026

14 sessions, 60 sub-agent transcripts, 6,685 responses and 14 measured compactions. Recorded: 2,372,503,415 tokens, $1,216.68 API list equivalent.

WindowTokens savedUSD savedExtra compactionsToken change
1M current0$0.0000.0%
600K suggested664,503,995$209.677−26.3%
400Kunavailable
300Kunavailable
200Kunavailable

To try the suggested window, type this in Claude Code for each model you want to change: /autocompact 600k

Caveat: backtest error band 6.4% against recorded tokens at the current window. This is measured replay error, not a statistical confidence interval; task quality and future output can change.

Dollars are API list price, not a bill.

Unavailable means Burn had no measured post-compaction size for that window, so it gives no figures for that row instead of guessing.

From the output of npx agentguard-burn compact-replay, Burn 0.6.0, set as a table. The figures are unchanged.

How it works

  • It replays the last 7 days of Claude Code sessions saved on your computer at your current auto-compact window and at 600K, 400K, 300K and 200K.
  • It uses the context size recorded on each request and the compactions that really happened. Sub-agents keep their own contexts.
  • For each window it shows tokens saved, dollars saved at API list price, extra compactions and the change in tokens, then suggests one window. It changes no settings: you type the /autocompact command yourself.

To look further back, add days and a number: npx agentguard-burn compact-replay days 30. Add json for the raw figures.

More from Burn

Burn has other free reports, like where one session's tokens went and your usage across sessions. See them on the Burn page.

The free AgentGuard plugin for Claude Code runs on Burn. Its status line shows sub-agents, tokens and your 5-hour limit live, above your prompt. Get the free plugin.

npx agentguard-burn compact-replay
Docs