Launching October 27, 2026
OptScale Kompressor

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 comment
  • Lena[maker]· 5d ago

    Hello 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.

Coding agents re-send their whole working history to the model on every turn, including build logs, compiler output and progress bars they have already read. OptScale Kompressor shortens that tool output in flight, without changing the agent or its prompts. The hard part is the prompt cache. Providers bill repeated input at about a tenth of the fresh price, but only as long as it stays byte-for-byte identical, so a compressor whose output shifts between turns breaks the cache and can cost more than it saves. Kompressor is rule-based and deterministic: the same input compresses to the same bytes, every turn. Nothing is lost for good. Every removed passage becomes a labeled marker such as [×37 ref:k_Qm9v…], and the model can fetch the original back. Only machine-generated tool output is touched. The result is never larger than the input, and on any error the request passes through unchanged. Results on Terminal-Bench 2.1 (87 tasks, Codex CLI with GPT-5.5, real provider bills with the cache discount included): 22.7% lower cost and 25% fewer input tokens than no compression, about twice Headroom's savings, and no significant change in tasks solved. Try it. One Rust binary, MIT-licensed, with pre-built releases for Linux and macOS: 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-agents

Deterministic, 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
hystax/optscale-kompressor 21 6Rustupdated 5 days ago
works withCodexopencodeaider

Key features

6 features of OptScale Kompressor
  • 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 KompressorCursorClineGemini CLIOpenAI Codex
Best forCache-safe token compression for coding agentsAI-enhanced code editingAutonomous coding agentsTerminal AI agentsLLM coding assistants
PricingFreemiumSubscriptionFreeFreeSubscription
DevHunt upvotes10000
LaunchedOct 2026————

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.