Open-source tool-output compressor cuts coding-agent bills 22.7% without hurting solve rate

MattAlreadyHere · reddit · 2026-10-16

Hystax open-sourced a compressor for coding-agent tool output (about half of prompt bytes in their traces). Three lessons: (1) compression can raise bills — 93% of input tokens were 1/10-price cache reads, so compression must be deterministic or the cached prefix breaks and the conversation re-prices; (2) de-duplicate, don't summarize — a rewriting compressor saved 6.2 more points but lost 12.9 points of details agents reuse (paths, identifiers, versions); keep one real copy of each distinct line and mark repeats; (3) make every elision retrievable — markers like [... 412 log lines omitted [ref]; 3 ERROR] plus a fetch tool. On Terminal-Bench 2.1 (Codex CLI on GPT-5.5, 87 tasks, real bills): cost −22.7%, input tokens −25%, solve rate 82.2%→81.1% (not significant), >200K-token requests 1.9%→0.13%; biggest savings on builds/ML training (26–28%), least on short algorithmic tasks (−8%).

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

Original post →

More from coding & agent

coding & agent channel →