Vibeleaderboard
Index / tool
Category
Developer Tools
Rank
No. 1375Tools index
Pricing
Open Source
Type
TOOL
Use case
Coding
GitHub
82 stars
Latest release
2.6.0
Date

About

OptScale Kompressor is a Rust proxy that compresses the history a coding agent re-sends to a model on each step, such as build logs and compiler output. The same input always compresses to the same bytes, so the provider's prompt cache keeps working, and removed details remain retrievable. The README reports a 22.7% real-bill reduction on Terminal-Bench 2.1 against a no-compression baseline, a vendor-run benchmark.

At a glance

OptScale Kompressor is a local proxy that shortens repetitive tool output before an agent sends it back to the model. It is worth evaluating if your long coding sessions repeatedly carry large build logs or lose their provider’s prompt cache.

Good fit

Teams running Codex or Claude Code that can compare token usage and task outcomes on representative jobs.

Consider something else when

Skip it if requests cannot pass through a local proxy or your sessions are short enough that repeated output rarely matters.

Start here

Run the same bounded synthetic task with and without the proxy. Compare billed usage and confirm the agent can still recover a key line from a long build log.

Cost and requirements

The MIT-licensed proxy runs locally and forwards requests to the configured model provider. It sits on the request path and can see prompt and tool content. Existing provider charges still apply.

Limits to know

The vendor reports savings on specific workloads. Results depend on repeated output and caching behavior, and retrieval can add tokens back.

Related work

Suggest an improvement
Read the source review

What it does

A single Rust program you put between a coding agent and its model provider. Agents resend their whole history every turn, including long build logs, file listings and search results. Kompressor folds that machine output down by fixed rules, with no model involved, and leaves a short handle where text was cut. The model can ask for any cut piece back, and the proxy answers that request itself, so the agent needs no changes. Identical input always yields identical output, which keeps the provider's discounted cache of earlier turns valid. One command wraps Claude Code, Codex, aider or opencode and tears down afterwards.

Why it's ranked here

The engineering is unusually careful and unusually candid. It is MIT licensed, refuses unsafe code in the crates it shows, and every failure path forwards the original request untouched. The headline numbers are the vendor's own: 22.7% off the real bill with Codex on GPT-5.5 across 87 Terminal-Bench tasks, and 20% with Claude Code. What raises trust is that the benchmark notes publish their own setbacks, including a no-compression control arm that failed to start on every run until it was fixed, and a single-task comparison where two control runs differed by 46.7%.

What's good

It prices savings on what the provider actually charges, cache discount included, instead of counting removed tokens at the full rate, and the docs show the naive number running four times too high. The Claude Code mode only compresses the new tail of a conversation and pings the cache every 4.5 minutes while a long tool runs, stopping after 11 pings, so a slow build does not force a full-price rewrite. One binary serves a command line, an HTTP API, an MCP server and the proxy. A command can explain why a given payload did not compress.

Tradeoffs

Every result comes from the vendor, and its own notes show agent trajectory noise can swamp the effect on small samples. Solve rate fell slightly with compression, 81.1% against 82.2%, a gap the README calls not significant. Recoverable mode means the model sometimes spends a round trip fetching text back, and the notes record listings being fetched back often enough that the team stopped trimming them. With an API key login, Codex is wrapped by editing its config file for the session. Cursor's agent CLI cannot be compressed at all. Intercepting Claude Desktop requires trusting a locally generated certificate authority. Building from source needs Rust 1.95.

How to use it well

Best fit is long, log-heavy agent work: model training, compiling from source, data pipelines. The vendor's own cohort table shows algorithm and puzzle tasks saving about 8%. Start with the wrap command on one agent and read the summary it prints on exit, then compare real bills over many tasks rather than one run. Keep the default recoverable mode when the proxy is in the path; use aggressive only for callers that cannot fetch text back. It does not summarise prose, process images or offer a dashboard; statistics come as SQLite and Prometheus metrics.

Technical notes+

Cargo workspace (edition 2024, rust-version 1.95, resolver 3) with members under crates/. crates/kompressor-engine/src/lib.rs states four invariants (never larger, every shrink accounted for by a marker, deterministic, fail open) and exposes detect and pipeline modules plus per-format compressors (logs, listing, search, diff, tabular, code, crossturn). Cargo.toml pulls tree-sitter grammars for ten languages, serde_json with preserve_order and arbitrary_precision for byte-exact round trips, zstd for request decoding because Codex compresses request bodies, and sets panic = unwind because the engine relies on catch_unwind to fail open. crates/kompressor-proxy/src/lib.rs documents the eight-step request path and holds keepwarm, prefixcache, cachettl and retention state shared across requests; it originates only 404, 413 and 502. crates/kompressor-cli/src/main.rs defines compress, detect, retrieve, stats, bench, check-config, serve, mcp, wrap and unwrap, with exit code 3 for a benchmark regression. docs/DESIGN.md lists refs and stats in SQLite (WAL), Redis behind a feature flag. docs/design/INTERCEPT.md covers the CONNECT listener, exact-host allow-list and ECDSA P-256 local CA. docs/BENCHMARK.md records the control-arm bug and the trajectory variance.

Observed

License
MIT
Language
Rust, edition 2024, minimum compiler 1.95
Interfaces
CLI, HTTP compression API, MCP server (stdio and streamable HTTP), LLM reverse proxy
Provider wire formats
OpenAI Chat Completions, OpenAI Responses, Anthropic Messages
Agent wrappers
Claude Code, Codex, opencode, aider, Cursor via manual setting; Cursor Agent CLI cannot be compressed
Compression method
Deterministic and rule-based; ML and prose summarisation are declared non-goals
Storage
SQLite for retained fragments and statistics; Redis behind a feature flag
Unsafe code
forbid(unsafe_code) in the engine, proxy and CLI crates
Benchmark source
Vendor-run Terminal-Bench 2.1 comparisons published in the README

Read from README.md, Cargo.toml, docs/DESIGN.md, docs/QUICKSTART.md, docs/BENCHMARK.md, crates/kompressor-proxy/src/lib.rs, crates/kompressor-engine/src/lib.rs, crates/kompressor-cli/src/main.rs, docs/design/INTERCEPT.md, LICENSE.

Similar tools

Browse all tools →

Tags

prompt-compressioncoding-agentrustproxyllm-costscli

Tech Stack

Rust

Editorially curated, with community endorsements as a secondary signal. Corrections welcome.