Reduce Codex token usage
Codex CLI burns through tokens fast on agentic work — file reads, shell output, test runs, all read back into context. Add TokenPincheras an MCP server and it compresses that tool output before it hits the model, lossless by default, so you get more out of the same budget.
claude mcp add tokenpincher -- npx -y tokenpincher mcpWhere Codex tokens actually go
Like other agentic coding tools, Codex spends most of its tokens on tool output, not your prompts — command results, file contents, diffs, logs. On long sessions that output dominates the context window and is usually what pushes you toward a limit or a costly bill.
How TokenPincher compresses it
TokenPincherruns as an MCP server that Codex calls directly. Unlike the Claude Code hook, compression isn't automatic here — it applies per tool call, and savings are biggest on tool-heavy output like file reads, shell output, and test logs. Outputs are shrunk lossless by default before they're sent to the model.
No desktop app
One line in your terminal or MCP config. No menu-bar app, nothing running in the background to manage.
Also using Claude Code?
TokenPincher works the same way there too. See reduce Claude Code token usage.
For more on where tokens go and how compression works, read the full guide.
Get started
npx tokenpincher init