
OptScale Kompressor
Cache-safe context compression for coding agents: 22.7% off the LLM bill
FreeAI CodingOpen SourceAI Agents14 impressionslaunches Oct 271 comment
Comments
>log in to commentHello DevHunt community! A bit of backstory. We run an AI gateway, and when we dug into our traces, about half of what coding agents sent was tool output: build logs, progress bars, the same compiler warnings, resent on every turn. So we went looking for a compressor. We spent a lot of time with Headroom, a great project, but for a shared gateway we kept hitting one issue: its output can change from one turn to the next, and every change risks breaking the provider’s prompt cache, the biggest discount on an agent’s bill. Kompressor is what we built instead. Same input, same output, every time, so the cache survives, and we can fetch back anything it cuts. On Terminal-Bench 2.1, it cut the real bill for Codex on GPT-5.5 by 22.7%. It’s open source under MIT. If you use Codex, try: kompressor wrap codex What’s eating your agents’ context? Curious what you’d want us to handle next.
kompressor wrap codex
Codex is the supported path; wrap also knows opencode, aider and Cursor (with your own OpenAI key). Claude Code is wrapped for retrieval but deliberately not compressed, because its whole prompt is pinned to the cache.
Kompressor is also the compression engine inside OptScale AI. Full benchmark report: optscale.ai/blog/context-compression-coding-agentsDeterministic, cache-safe context compression for coding agents that reduces LLM token costs.
- for
- Teams using LLM-powered coding agents and CI/CD pipelines.
- pricing
- freemium · free trial
- license
- MIT
- 1.0.210 days ago
Key features
- Deterministic rule-based compression — Same input always yields identical compressed bytes, preserving prompt-cache discounts.
- Labelled, retrievable elisions — Removed sections are replaced with markers that can be fetched back within an hour.
- Format-specific compressors — Handles build logs, compiler diagnostics, JSON, diffs, source code, and more with custom rules.
- Fails-open safety — If compression would increase size or error occurs, the original request is sent unchanged.
- Fast lightweight binary — 33 KB Rust binary processes ~0.2 ms per KB of tool output on Linux/macOS.
- Integrated with OptScale AI agents — Wraps Codex, opencode, aider, Cursor and works as the compression engine inside OptScale AI.
Use cases
- Compress repetitive build and package logs during long CI runs
- Reduce token traffic for LLM-driven code review agents
- Shrink large compiler diagnostic outputs while keeping errors accessible
- Minimize context size for training pipelines that emit massive terminal output
OptScale Kompressor vs alternatives
OptScale Kompressor | Cursor | Cline | OpenAI Codex | ||
|---|---|---|---|---|---|
| Best for | Cache-safe token compression for coding agents | AI-enhanced code editing | Autonomous coding agents | Terminal AI agents | LLM coding assistants |
| Pricing | Freemium | Subscription | Free | Free | Subscription |
| DevHunt upvotes | 1 | 0 | 0 | 0 | 0 |
| Launched | Oct 2026 | — | — | — | — |
- OptScale Kompressor vs Cursor: Cursor is an AI-powered code editor; Kompressor is a standalone compression engine for agent output.
- OptScale Kompressor vs Cline: Cline is an autonomous coding agent; Kompressor only compresses its tool output without being an agent.
- OptScale Kompressor vs Gemini CLI: Gemini CLI is a terminal AI agent; Kompressor focuses on reducing token traffic for any agent.
- OptScale Kompressor vs OpenAI Codex: OpenAI Codex provides coding capabilities; Kompressor optimizes the token cost of Codex’s output.
OptScale Kompressor FAQ
Does compression break the LLM prompt cache?+
No. Kompressor is deterministic, so the compressed output is byte-identical across turns, preserving cache discounts.
What happens if compression makes the request larger?+
The compressor discards the result and passes the original request through unchanged.
Is any machine-generated output left untouched?+
Only output under ~512 bytes, system/assistant messages, and blocks that would break the cache are never compressed.
Can I retrieve the original content after compression?+
Yes. Markers contain a hash reference; the model can call kompressor_retrieve to get the full content back for up to an hour.
Is the tool open source?+
Yes. The engine is an MIT-licensed Rust binary available on GitHub as optscale-kompressor.
What formats does Kompressor support?+
It has rule-based compressors for build logs, package managers, logs, compiler diagnostics, terminal redraws, JSON, tables, diffs, listings, source code, configs, HTML, and plain text.
Summarized by DevHunt from optscale.ai · Oct 21, 2026. Details may change; check the official site.
OptScale Kompressor
Cursor
Cline
OpenAI Codex







