context-mode
Tools

ctx_stats

See exactly how much context window you saved this session.

ctx_stats reports what context-mode kept out of your context window this session. It reads the running counters and shows them back to you: total bytes processed in the sandbox, bytes actually returned to context, the estimated tokens those bytes represent, a per-tool breakdown, the savings ratio, and the percent reduction. It changes nothing — it only reports.

The point of context-mode is that raw bytes stay in the sandbox while only the answer enters context. ctx_stats puts a number on that. On a typical session the knowledge base and sandbox keep roughly 98% of the bytes out of context, and this command is where you confirm it for your own work.

What it reports

FieldMeaning
Bytes processedTotal raw bytes handled in the sandbox across all tools.
Bytes returnedBytes that actually entered your context window.
Estimated tokensToken estimate for the bytes that entered context.
Per-tool breakdownBytes processed and returned, split by tool.
Savings ratioBytes processed divided by bytes returned.
Percent reductionShare of bytes kept out of context.

The savings ratio is the headline figure. It is computed as bytes processed divided by bytes returned, so a ratio of 50 means the sandbox handled fifty times the data that ever reached your context window.

When to use it

Run it whenever you want to see the payoff, for example after a heavy analysis pass over logs, a large fetch-and-index step, or a batch of commands. The per-tool breakdown shows which tools did the most work, so you can tell where the savings came from.

ctx_stats is read-only. It never wipes the knowledge base or resets counters. To clear everything and start fresh, use ctx_purge.

Example

ctx_stats is a tool your agent calls — there is no terminal stats subcommand. Trigger it from the chat at any point in a session by typing ctx stats to your agent, or run the slash command /context-mode:ctx-stats in Claude Code and Cursor. Both surfaces print the same report.

In chat, just ask for it:

Type this to your agent
ctx stats

On this page