Twice the Savings of Headroom on Coding-Agent Traffic
Project details
Coding agents re-send their whole history every turn, so on a long task the model re-reads the same build output dozens of times, and you pay for every read. OptScale Kompressor stops that: on Terminal-Bench 2.1 it takes 22.7% off the real bill. The same input compresses to the same bytes every turn, so the prompt cache keeps working. Open source (MIT), one Rust binary, no ML model.
Coding agents re-send their entire working history to the model on every step, including build logs, compiler warnings and progress bars. On long tasks the same output is re-read dozens of times and billed each time. OptScale Kompressor removes that redundancy.
On Terminal-Bench 2.1 (Codex CLI, GPT-5.5, real provider bills with the cache discount): 22.7% lower cost, about twice Headroom's savings, no significant change in solve rate. The largest gains are on ML training, source builds and data pipelines.
| Metric | No Compression | Headroom | OptScale Kompressor |
|---|---|---|---|
| Total Cost | $107.89 | $99.04 | $83.40 |
| Input Tokens | 96.1M | 95.5M | 72.2M |
| Tasks Solved | 82.2% | 81.6% | 81.1% |
| Median Trial Time | 4.8 min | 5.3 min | 4.5 min |
Codex is supported:
kompressor wrap codex
Claude Code runs through the wrap but is not compressed, because rewriting its cached conversation would invalidate the prompt cache. Details are in the README.
MIT-licensed. Runs as a single binary or inside OptScale AI.
Full benchmarks and write-up: OptScale Kompressor: Twice the Savings of Headroom on Coding-Agent Traffic
Comments
0Start the conversation
Share the first comment.