Token Harness open-sourced to reduce Claude Code and Codex token usage
Key point
The tool reports up to 62.5% reduction in overall tool output and 88.4% on Claude Code by using optimizers like RTK to minimize context noise.
Details
Token Harness has been open-sourced as a local tool designed to extend Claude Code and Codex subscription allowances and reduce API costs by minimizing token consumption from context noise such as long test runs, build logs, and large MCP tool catalogs.
Optimization and Routing
The tool detects and connects compatible optimizers like RTK and HarnessTrim to shorten shell and tool output, ensuring the agent only processes failures, errors, and summaries. Optional integrations include mcptoon for lazy-loading MCP definitions, Headroom for payload compression, and GitNexus for code relationship mapping. A native routing hook allows the main model to delegate bounded subtasks to cheaper models (e.g., Opus to Sonnet/Haiku) while retaining oversight.
Performance and Usage
On the author's machine, the dashboard reports a 62.5% reduction in overall tool output with RTK, and 88.4% specifically for Claude Code. The tool is installed via npm install --global token-harness@latest and provides a local dashboard for configuration and monitoring without requiring an account or API key. It supports Windows, macOS, Linux, and WSL, with all changes previewed and reversible.
This summary was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.
Our guide explains how the AI works. Report summary errors, attribution issues, or removal requests via Contact.