Kompressor cuts coding-agent context ~25% with deterministic Rust tool-output compression

MattAlreadyHere · reddit · 2026-10-16

Hystax open-sourced Kompressor (MIT, Rust), a rule-based compressor for coding-agent tool output—apt logs, compiler warnings, progress bars—which make up roughly half of agent history in their traces. Hard constraint: identical input always yields identical bytes, so prefix caching (llama.cpp, vLLM, provider-side) stays valid. No ML, no randomness, 0.2ms/KB on CPU; removed content goes to a reference store the model can fetch back.

Terminal-Bench 2.1 results (Codex CLI + GPT-5.5, 87 tasks): input tokens per run dropped from 96.1M to 72.2M (−25%), P90 request size from 106.9K to 66.5K tokens, requests over 100K from 11.2% to 3.2%, with solve rate essentially unchanged (82.2% → 81.1%). Heaviest tasks peaked at 60K tokens instead of 165K.

Versus Headroom's ModernBERT approach on 34.2M chars of real tool output: Kompressor removed 62.8% at 0.2ms/KB versus 22.6% at 87ms/KB, without altering line contents. Caveat: all benchmarks were on hosted models; local numbers are still pending.

Related event: Hystax Open-Sources Kompressor, Cutting Coding Agent Costs by ~25%(2 posts)→

Original post →

More from coding & agent

coding & agent channel →