TokenBeaver vs squeez: hook-based compression vs a measured gateway
squeez is what happens when someone takes agent-hook compression seriously: five CLI hosts, aggressive dedup, session memory, zero dependencies, free. It deserves a fair comparison — so here's one.
What squeez is, and what it does well
squeez is an open-source, hook-based token compressor for five AI CLI hosts — Claude Code, Copilot CLI, OpenCode, Gemini CLI, and Codex CLI. Its README claims up to 95% compression on bash output and 80–99% reduction on build/test logs, using cross-call dedup, signature-mode code reads, and a hook that can shrink a 10,000-line build log to a 200-line error summary before it ever enters context. It even injects a structured summary of your previous session on start.
- Genuinely broad host support for a hooks-based tool.
- Clever ideas: session memory, efficiency scores, self-teaching protocol.
- Zero runtime dependencies, zero cost.
Where the jobs differ
Hooks fire when the host lets them fire. That gives squeez real leverage over tool output — and no visibility into anything else, or into what any of it costs you.
- Gateway vs hooks. TokenBeaver sits in the request path itself, so the entire payload is optimized — tool output, re-read files, accumulated history — for any OpenAI-compatible agent, not only hosts with a hook API. Claude Code is one command; everything else is one base URL.
- Measured, not vibes. Compression ratios tell you what got smaller, not what you saved. TokenBeaver's dashboard shows cost and savings per session — in dollars on API keys, in runway on Claude Pro/Max — estimated free, verified on Pro.
- Safe by design. Aggressive summarization can cost you the one line the model needed. TokenBeaver slims without losing what matters, and anything trimmed is restorable on demand — no missed answer, no re-ask tax.
- Accountability. Pro's Activity Log (search, filters, CSV) and the savings guarantee exist because "trust me, it's compressing" isn't a number you can take to anyone.
Pick honestly
Pick squeez if you live in supported CLI hosts, want maximum compression for free, and don't need the savings measured or proven.
Pick TokenBeaver if you want the same class of savings with a meter on it — free forever to start, one install, and a Pro tier that has to earn its keep, by policy. For the Claude-specific squeeze, see cutting Claude Code costs.
Free forever — no login, no card. CLI from npm or the VS Code extension, same local gateway either way.
Download free → See pricing