ByteCosts
supercompress-query-aware-compression-review.mdx

AI Coding Agents

SuperCompress Review: Query-Aware Context Compression, Hosted and Local

SuperCompress is a query-aware compression layer: it scores blocks of a long context against the current question, keeps answer-critical lines verbatim, and drops the rest, claiming a 64.1% mean cut on its own 24-case coding-agent suite. The recommended engine is a ~400M cross-encoder hosted on the vendor’s API, so your context leaves the machine unless you use the lighter local compiler path. Claims are the vendor’s own, the downstream LLM eval has not been run, and the issue tracker documents real accuracy bugs worth knowing.

What SuperCompress is and which cost layer it targets

SuperCompress sits in front of inference and reduces the input side: RAG chunks, chat history, tool dumps, logs, and JSON that an application or agent ships with every call. Unlike deterministic formatters, it decides what to keep by relevance to the current query; the README is explicit that the query itself is never compressed, only the surrounding context. The output is a smaller prompt plus token stats, with kept lines preserved in original wording and auditable.

The repo is JavaScript and Python, MIT licensed, created July 2026. As of November 30, 2026 it has 152 stars, 23 forks, and 22 open issues; the latest release is v0.5.37 from October 1, 2026.

How it works

The pipeline is: take context plus query, segment the context into blocks, score each block for relevance to the query, keep entities, errors, definitions, and nearby dependencies, and return the kept set. Two engines exist:

Neural v2 (recommended)Compiler (local)
Engine~400M query-aware cross-encoder (“Neural Keep”)Lightweight local policy
RuntimeHosted on Fly CPULocal CPU, millisecond-class
Best forHighest-quality keep on agent dumpsLocal preprocessing, speed

The cross-encoder weights are open (MIT) on Hugging Face as arjunkshah21/sc-keep-crossencoder-v4-large, but the recommended runtime is the vendor’s hosted API at supercompress.dev behind SUPERCOMPRESS_API_KEY. Two products wrap it: a coding-agent plugin (npm i -g supercompress-proxy && npx supercompress setup, installs an MCP compress_context tool for Cursor, Claude Code, Codex, and “40+ agent harnesses”, keeping your normal agent login) and a Python/HTTP API (pip install supercompress) plus a paste-in Arena.

The privacy split deserves attention because it is the unusual part of the design. With the Neural path, your tool dumps and context are posted to the vendor’s hosted API for scoring before your model ever sees them; the local compiler is the only fully on-box option, and it carries older, separate benchmark numbers. Closed issue #126 is titled “Architecture: move billing/idempotency/rate-limits off Auth custom claims.” If your context contains anything you would not send to a third party, evaluate the compiler path or self-hosted weights rather than the default.

Install and first run

For coding agents:

npm install -g supercompress-proxy
npx supercompress setup

The setup links your account, detects agents, and installs the MCP tool. For programmatic use:

pip install supercompress
export SUPERCOMPRESS_API_KEY=sc_live_YOUR_KEY
from supercompress.client import SuperCompress

sc = SuperCompress()
result = sc.compress(
    context=long_context,
    query="What failed and how do we fix it?",
)
print(f"{result.original_tokens} → {result.kept_tokens} tokens")

Removal is uninstalling the npm/pip packages and deleting the MCP entry npx supercompress setup wrote; the README does not document a dedicated uninstall command.

What it saves: claims versus evidence

All numbers are vendor-reported, and the vendor is more precise than most about what they mean. On its B5 coding-agent suite (24 cases), it reports a 64.1% mean context cut, 24/24 evidence-retention passes, tokens reduced 16,647 to 5,148, up to 96.6% cut at ≥99% retention, and p50 latency of about 5.8 seconds on the hosted Neural Keep path. Two qualifications are printed in the README itself: the metric is evidence containment (did required lines survive), not downstream LLM completion, and the downstream eval is explicitly “not yet run”. The aggregate mean cut across all 390 public cases is about 3.6%, because the engine refuses to over-cut dense needle/QA slices; the 64.1% headline applies to noisy coding-agent dumps, not to contexts that are already dense with relevant material.

The legacy local compiler carries separate held-out numbers (about 58-66% cut at 99.4% gold containment) on the benchmarks page; the README warns not to mix them with Neural v2.

The issue tracker supplies the corrective evidence. Open issue #199 reports evaluation feedback on 0.5.27 to 0.5.37: dropped facts reported as low risk, an anthropic-beta header dropped, and unsupported claims. Closed issues document bugs that hit exactly where query-aware selection can hurt: #149 where log dedup collapsed lines differing only in digits and silently dropped distinct ids, #150 where retrieval returned the wrong original because a simpleHash collided, and #146 for surrogate-pair corruption when splitting multi-byte UTF-8. Closed #130 noted the committed benchmark JSON’s sample counts did not match the numbers shown on the site. The open list also contains many [email]-titled items (inbox and infrastructure threads) and open #320, a production smoke failure where the Firebase auth handler proxy returns 404, suggesting the hosted service has had rough edges.

Prompt-cache and extra-turn risk

Two costs follow from the architecture. First, latency: the hosted Neural Keep path reported ~5.8 s p50 on B5, which is added to every compression call and can exceed the time saved on small contexts. Changing the query can change which blocks survive. If the resulting text changes within the cached prefix, cache reuse may fall. Measure provider-reported cache reads during the trial.

The extra-turn risk is the sharper one: if scoring drops a line the model needed, the agent re-fetches. The containment metric says required evidence survived in the B5 suite, but issue #199 reports dropped facts in the same release window, and issues #149/#150 show how dedup and hashing edges silently lose distinct data. On evidence-heavy debugging, verify kept lines before trusting the cut.

A cost example

Assume a RAG backend sends 16,000 tokens of retrieved context per call (matching the B5 scale), 2,000 calls a day, on gpt-6.2-sol at $2 per million input tokens (rates).

  • Uncompressed: 32,000,000 input tokens/day, $64.00/day (estimate).
  • At a hypothetical 64.1% reduction, 32 million × 0.641 × $2 per million = $41.02 per day.
  • At a hypothetical 3.6% reduction, 32 million × 0.036 × $2 per million = $2.30 per day.

Both are fresh-input estimates before compression fees, cache effects, and retries. The percentages come from different vendor benchmark slices. Measure the reduction on your own mix of queries and retrieved context. Before running the test, decide what counts as required evidence for each answer. For a debugging query, that might mean the error line, its timestamp, and the later state change that resolved it. Score whether each survives and whether the final answer links the events correctly. Log separate results for noisy tool output and passages where most lines carry relevant evidence. Averaging the groups can hide a serious retention problem in the cases with the least room to compress. Keep the model and question fixed when you compare the original with the compressed version. Record how often each version produces an answer you can accept without fetching the source again. Count that fetch and any follow-up model turn in the trial.

Who should use it, who should skip it

Use it if:

  • Your pipeline ships large, noisy context dumps (tool results, logs, RAG piles) where much of each call is irrelevant to the current query.
  • You can send context to a hosted API, or you are willing to run the lighter local compiler/self-hosted open weights.
  • You want auditable kept lines and a containment metric you can check rather than a black-box summary.

Skip it if:

  • Privacy rules out third-party context processing; default the evaluation to the local compiler path.
  • Your test contexts are already dense with relevant material and the trial finds little safe reduction.
  • You need proven downstream answer quality today; the project itself says that eval has not been run, and #199 questions recent scoring.
  • You cannot absorb ~5.8 s p50 added latency on the hosted path.

How to trial it safely

  1. Start with synthetic or scrubbed dumps in the hosted Arena or Python client. Check that the kept context retains the evidence in the original.
  2. Use the local compiler for sensitive payloads and verify its results separately.
  3. Run the A/B method in how to measure coding agent token savings: fixed task set, provider-billed input tokens, plus a task-level check that answers did not degrade.
  4. Diff the kept context against the original on failures; issues #149 and #150 show the silent-loss modes to look for (digit-only differences, hash collisions).
  5. Track latency alongside tokens; a 5.8 s p50 compression call can erase interactive gains.

Alternatives and next reads

Tokenfold takes the opposite stance: deterministic, reversible, fully local, with an optional experimental scorer. LLMLingua is the research-grade neural compressor you run yourself. For deterministic per-command dedup, see sqz; for whole-request proxy compression, see Tamp.

Sources

How this note was produced

Drafted with AI assistance from committed ByteCosts pricing snapshots and deterministic cost formulas. Figures are grounded in the linked sources (last updated 2026-11-30). Read our editorial & automation policy, inspect the methodology, or report a discrepancy.

SuperCompress Review: Query-Aware Context Compression, Hosted and Local. ByteCosts. Updated 2026-11-30. https://bytecosts.com/blog/supercompress-query-aware-compression-review/

Sources