Derin Barutçu
CostMaxx cover reading 55.4 percent less model-visible output
CostMaxx
← projects

CostMaxx

Coding agents burn context on tool output they barely use: thousand-line test runs for three failing tests, full diffs for a rename, complete build logs for one error. CostMaxx returns a compact summary and keeps the full evidence locally, retrievable by digest.

Role and process

Role: Systems engineer and agent tooling builder

Challenge: Coding agents burn tokens on tool output they barely use: thousand-line test runs for three failing tests, full diffs for a rename, complete build logs for one error.

  • Return only the signal the model needs: pass/fail counts, failing test names, duration.
  • Keep full output local, zstd-compressed and content-addressed — nothing leaves the machine.
  • Hooks are observe-only; the model must call costmax_run explicitly.

Output reduction: 55.4% · Answers preserved: 60 of 60 · Raw output: Kept locally

Tools: Go, MCP, CLI tooling, SQLite, Deterministic reduction, Token efficiency

The context problem

A failing test run can spend 1,377 tokens to say three tests failed. CostMaxx keeps the signal and stores the rest. The left panel is what the model would have seen; the right panel is what it needs.

Before and after comparison of a failing test run reduced from 1,377 to 54 tokens
The same failing test run, two ways. Full evidence stays retrievable.

A smaller answer, same evidence

The model sees a compact summary: command, exit code, counts, failing names, duration. Raw output stays local, zstd-compressed and content-addressed, so it can be retrieved without being re-run.

CostMaxx output reduction summary
55.4% less model-visible output across the evaluation.

Local by design

Hooks observe; the model calls the tool explicitly. Reduction is deterministic, with no model in the loop. Same command, same output, same compact summary.

CostMaxx execution flow from command to compact summary and local artifact store
Execution flow. Reduce, retain, return.

Measured, not asserted

A 20-fixture, three-repetition evaluation reports 55.4% less model-visible output while retaining all 60 answer signals. The control arm is reported honestly: savings come from real command output, not from dropping evidence.

CostMaxx savings chart from the evaluation
Evaluation results. Raw Codex transcripts were re-parsed for the measurement.

What it does not do

It is not a sandbox and it does not compress interactive, destructive, or secret-sensitive commands. It runs with the permissions of the process that calls it. The next step is support beyond Codex and a wider reduction catalog.