If you run AI coding agents at any scale, token costs compound fast. Every step re-sends the full working history to the model, including build logs the agent already read. Hystax just open-sourced a fix.
What OptScale Kompressor Does
OptScale Kompressor sits between your agent and the model provider and rewrites machine-generated tool output before it hits the context window. It does not touch your agent code or your prompts. On Terminal-Bench 2.1, running the Codex CLI agent with OpenAI’s GPT-5.5 model across 89 command-line tasks, it cut the real provider bill by 22.7% and input tokens by 25%.
Task success held steady: Kompressor solved 81.1% of tasks versus 82.2% without compression, a difference Hystax describes as not statistically significant.
Why Deterministic Design Matters Here
This is the part worth understanding. Most LLM providers offer prompt caching, which bills repeated input at a steep discount, but only when the cached text stays byte-for-byte identical. A compressor that changes its output between turns breaks the cache and can cost more than it saves.
Kompressor avoids that trap by being fully rule-based with no machine learning involved. The same input always produces the same output, so the provider cache stays intact. Every removed passage gets replaced with a labeled marker the model can fetch back on demand.
Benchmark Numbers
- Provider bill reduction vs. no compression: 22.7%
- Input token reduction vs. no compression: 25%
- Headroom (default settings) cost reduction: 8.2%
- Headroom (most aggressive settings) cost reduction: 11.6%
- Kompressor cost advantage over Headroom default: 15.8% less
- Savings on ML training and evaluation tasks: 26%
- Savings on building software from source: 28%
- Requests above 200,000 tokens: dropped from 1.9% to 0.13%

Technical Specs
Kompressor ships as a single Rust binary for Linux, macOS, and containers. It processes one kilobyte of output in about 0.2 milliseconds. It makes no external network calls, no telemetry, no model downloads.
Format-specific compressors handle logs, compiler messages, JSON, diffs, and source code separately. If compression fails or does not shrink the output, the original passes through unchanged.
“Coding agents spend a large part of their budget re-reading their own build logs. Kompressor removes that repetition without hiding anything from the model, because every line it removes can be fetched back. We are making it open source because any component that sits between a company’s agents and its models should be open to inspection, line by line.” — Nick Smirnov, CEO at Hystax
Availability and Pricing
OptScale Kompressor is MIT licensed and free. It’s available now at github.com/hystax/optscale-kompressor. It also runs inside the paid OptScale AI platform as part of its cost optimization features. The full benchmark report with per-task results and methodology is on the OptScale AI blog.
