Claude Code /compact alternative: TokenPincher
Claude Code's built-in /compact command is free and does a real job — it summarizes your chat history when the context window fills up. TokenPincher does something different: it automatically compresses tool output and logs before they hit the model, lossless by default, on every request, with no manual step.
npx tokenpincher initFeature comparison
| Feature | /compact | TokenPincher |
|---|---|---|
| Cost | Free, built into Claude Code | Free tier, paid plans for more |
| Trigger | Manual — you run /compact | Automatic, runs on every request |
| Scope | Summarizes chat history | Compresses tool output and logs, not just chat |
| Fidelity | Summarized context is lossy | Lossless by default (truncates only past 400 lines) |
| Setup | None, already in Claude Code | One-line install (CLI or MCP) |
| Proof | No savings report | Built-in stats screen, tokens + $ saved |
Why /compact isn't the full answer
/compact only runs when you tell it to (or when Claude Code forces it near the context limit), and it works by summarizing — which means some detail is genuinely lost. It also only touches chat history, not the tool output and logs that make up most of an agentic coding session's token spend.
What TokenPincher adds
TokenPincherruns automatically on every request instead of waiting for you to notice your context is full. It targets tool output and logs — the biggest source of token spend in Claude Code — and compresses lossless by default rather than summarizing. The two aren't mutually exclusive: you can use /compact for chat history and TokenPincher for everything else. Read the reduce Claude Code token usage overview or the full guide for more. Also using Codex? See the Codex page.
Try TokenPincher
npx tokenpincher init