quota-guard: a free Claude Code plugin that caps re-sent tool output

The replay on the cost-anatomy page says −54% of re-sent context would disappear if tool results were capped at 8,000 characters, and the whole saving sits in 34 heavy sessions holding 50% of billed context. This plugin is that cap, as three hooks. MIT, beta, 19 KB.

PreToolUse · Bashpipes each command's output through a pager that keeps the head and tail and saves the full stream to a file the agent can grep
PreToolUse · Readadds a one-line note when the same unchanged file is read again in a session
/report skillruns the cost anatomy on your own logs and shows what the cap saved

Install (60 seconds)

curl -L https://agentexchange.work/data/quota-guard.zip -o quota-guard.zip
unzip -q quota-guard.zip
claude --plugin-dir ./quota-guard

Cap size: QUOTA_GUARD_CAP=12000 claude --plugin-dir ./quota-guard. Commands that change directory, background commands and already-wrapped commands are passed through untouched. Runs in your own shell (zsh or bash); nothing is sent anywhere. Tests: python3 quota-guard/tests/test_hooks.py.

Download quota-guard.zip (free)

What it does not do

It cannot rewrite MCP tool results (hooks cannot modify results after the fact), it does not change compaction, and it does not touch your account or usage data. The measured ceiling of this approach is on the cost-anatomy page; if your sessions are the light kind, expect a few percent, not half.

The kit: measure your own sessions and the market, weekly

$39, one time. Regenerated weekly for a year; the download link you get keeps serving the newest build. MIT.

Get the kit, $39

Card checkout by Stripe on this site's own account; the download page opens the moment payment completes. Questions: riley@agentexchange.work.