Diagnose how much of a coding agent's token budget is wasted on noisy tool output.
Install an adapter to automatically slim test logs, diffs, and file listings before they reach the model.
Pipe command output like test results through the reducer to shrink it before pasting into a chat.
Run the benchmark suite to measure real token savings instead of relying on self-reported claims.
| giuliastro/harnesstrim | 1476989162/vue-bill-print | 1e3pm/knowledge-chatbot | |
|---|---|---|---|
| Stars | 11 | 11 | 11 |
| Language | TypeScript | TypeScript | TypeScript |
| Setup difficulty | easy | easy | moderate |
| Complexity | 3/5 | 2/5 | 3/5 |
| Audience | developer | developer | developer |
Figures from each repo's GitHub metadata at analysis time.
Runs directly via npx with no checkout needed, a full clone with pnpm is only required for development or benchmarks.
HarnessTrim is a tool that cuts down how many tokens AI coding assistants use, working across several different tools at once, including Claude Code, Codex, OpenCode, Hermes Agent, and Pi. Tokens are the units these AI systems are billed on, and they get spent in several places: reading noisy tool output like test logs and file listings, the model's own reply text, its internal reasoning, always loaded instruction files, and the conversation history that survives as a session goes on. Most existing tools only reduce waste in one of those areas. HarnessTrim's approach is to coordinate all of them under one shared policy instead. The project has three layers. At the core is a portable pack of Agent Skills, a format supported by each of the tools it targets, which carries the actual policy and costs almost nothing until it is used. On top of that sit small adapters written specifically for each coding tool, translating the shared policy into that tool's own hooks or plugin system. Finally, a benchmark suite backs up its claims with reproducible measurements rather than self reported numbers. In practice, once an adapter is installed, HarnessTrim intercepts the output of tool calls, such as test runs or file reads, and automatically shrinks that output before it reaches the model, while trying to keep the important lines, like error messages or failing assertions, intact. It measures both how much it reduces token usage and whether that important signal actually survives the reduction. You can try it without installing anything by running it directly through npx, using commands to diagnose token waste in a project, install an adapter for a specific coding tool, or pipe noisy command output through it to slim it down. For development or to run the built in benchmarks, you clone the repository and install dependencies with pnpm.
A cross-tool token-saving system that reduces noisy output for AI coding assistants like Claude Code and Codex.
Mainly TypeScript. The stack also includes TypeScript, Node.js, npm.
Setup difficulty is rated easy, with roughly 5min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Don't trust strangers blindly. Verify against the repo.