Two Claude Opus 5.5 agents got the same coding task in the same repo at the same commit. One ran with rtk's Claude Code hook, which compresses shell output. The other ran without it. This page shows what each one actually spent.
50,148 → 42,028 characters across every Bash call. rtk's own tracker counts 1,482 tokens saved.
The rtk agent made 2 more requests, and each request re-sends the whole conversation.
Even: $0.7669 without rtk, $0.7695 with it.
Headless Claude Code (claude -p) runs, so token counts come straight from the API usage records.
npm ci.claude-opus-5-5, the same project instructions and the same MCP setup.PreToolUse hook and RTK.md instructions, exactly what rtk init -g installs.Outcome: both succeeded. Each wrote 11 passing tests (436 lines without rtk, 576 with it), got a green check and made one commit.
The rtk run's context grows more slowly, but it runs two more requests.
Each request bills its full context again, so the two extra requests outweigh the smaller outputs.
Almost all input is served from the prompt cache. Output (the test file the agent wrote) is the same size on both sides.
Bar height is the size of the result returned to the model. Hatched bars are file writes, which rtk doesn't touch.
Most of the cost comes from exploration (cat, sed, grep), where rtk changes little. Test and check runs were already piped through tail / grep by the agent.
From rtk gain after the run. 22 rewritten commands, because the hook rewrites each part of a && chain.
| Command | Runs | Saved | Rate |
|---|
From one run per side. Read them as signals, not a verdict.
tail -40 or grep on its own, leaving rtk little to cut on the expensive calls.cargo test, large git log or docker logs, or agents that don't trim output themselves.One run per side. The agents' paths diverge after the first step, so the differences mix rtk's effect with ordinary run-to-run variation. Wall time (190s vs 210s) includes a shared queue for heavy commands, because both ran npm run check at the same time. Usage figures are cumulative totals from each session's final result.