Hermes Atlas
Developer tools & SDKs · works with Hermes Agent

HarnessTrim

giuliastro/HarnessTrim

Local token-economy optimizer for Codex, Claude Code, OpenCode, Hermes, Pi and OMP tool output

In short

HarnessTrim is a local, cross-harness optimizer that shrinks noisy tool output for coding agents including Codex, Claude Code, OpenCode, Hermes, Pi and OMP, using deterministic reducers, native integrations and portable skills.

What HarnessTrim does

HarnessTrim reduces tool-output noise so more of the context window goes to code and evidence. It combines deterministic output reducers, native integrations for each agent, portable skills and reproducible benchmarks. The README states that it does not replace the coding agent or silently switch to a cheaper model. Installation is a global npm package followed by harnesstrim doctor, and harnesstrim install claude or codex adds hooks, skills and a marker-guarded CLAUDE.md or AGENTS.md instruction, with --apply required to write anything.

Version 0.3.0 keeps the original shape of Claude Bash output, including stderr and exit codes, and an optional Codex hook preserves the full response envelope. Test-output reducers drop passing lines only when recognized and keep failures, warnings and diffs. The published fixture suite reports a total of 7,747 tokens reduced to 1,876, a 75.8 percent reduction, with all 48 required signals retained, counted with cl100k_base. The package has zero runtime dependencies.

Key features

  • Deterministic reducers for test runs, diffs, logs, JSON and file listings
  • Claude Code Bash PostToolUse hook and optional Codex Bash hook
  • Preview mode: nothing is written without --apply
  • harnesstrim doctor diagnostic
  • Reproducible fixture benchmarks
  • Zero runtime dependencies

When to use it

  • Cutting long passing-test output before it reaches the model
  • Applying one token policy across several coding agents
  • Checking a setup with npx harnesstrim doctor without a permanent install

Who it is for: Developers who use several coding agents and want to lower tool-output token use without changing models.

How it fits with Hermes Agent

It lists Hermes among six supported harnesses; the install examples in the opening part of the README cover Claude Code and Codex.

How to install HarnessTrim

These commands are copied from the project's README. Check the repository for the latest steps before you run them.

npm install -g harnesstrim@0.3.1
harnesstrim doctor

Note: The published benchmarks are fixture results counted with cl100k_base, not measurements of full session bills or coding success.

FAQ

What is HarnessTrim?

HarnessTrim is a local optimizer that reduces tool-output noise for coding agents. It uses deterministic reducers, native integrations, portable skills and benchmarks.

Does HarnessTrim work with Hermes Agent?

Yes, the README lists Hermes among its six supported harnesses. The install examples shown first cover Claude Code and Codex.

How do I install HarnessTrim?

Run npm install -g harnesstrim@0.3.1 and then harnesstrim doctor. Use harnesstrim install with a harness name and --apply to add the integration.

Similar dev tools for Hermes Agent

All dev tools

Related guides: How to install Hermes Agent · Run multiple Hermes agents with profiles