Hi, I'm Julia from the Hystax team. When we launched Kompressor, Claude Code wasn't compressed yet. Our CTO Max and the team have fixed that, and here is what they learned in the process.
THEORY: on Claude Code, the cache is the bill
92-95% of Claude Code's prompt tokens are cache reads. On Opus 5.5, a cache read costs $0.20 per million tokens and a cache write $5, 25 times more.
A cache entry lives five minutes. When a build or a training run keeps the agent idle for longer, the whole prefix is written again at full price. In our baseline, that was a third of everything billed at full price.
Changing any byte inside the cached prefix forces a rewrite, so compressing old history costs more than it saves.
So the question is not "how many tokens can I remove?" but "how often am I paying for the same tokens twice?"
Hi, I’m Max, CTO at Hystax.
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.
How it works:
It sits between the agent and the model provider and rewrites machine output (build logs, grep results, JSON, directory listings, source files) into a shorter form that marks exactly what was removed.
The same input always compresses to the same bytes, so the prompt cache is not invalidated.
By default keeps every removed fragment behind a handle; if the model asks for it, the proxy fetches it back on its own.
No ML model, nothing downloaded at runtime: a single Rust binary, about 0.2 ms per KB.
Results 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.
Current status: 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.
Questions and feedback welcome.
Update: Claude Code is now supported. Instead of rewriting the cached conversation, Kompressor compresses only the uncached tail and keeps the prompt cache warm while tools run. On Terminal-Bench 2.1 with Claude Code on Opus 5.5, that took 20% off the Anthropic bill, with 99% fewer tokens lost to cache expiry. Details: https://www.producthunt.com/p/optscale-kompressor/how-to-cut-claude-code-token-costs-theory-and-practice-of-prompt-caching