SuperCompress

Guide · Updated 2026-10-13

Guide Coding agents Cost

Does context compression lower your bill?

If you run Claude Code, Codex, Cursor or a similar coding agent, shrinking tool output looks like an obvious way to pay less. Independent measurements keep finding a gap: fewer tokens on a payload is not the same as a cheaper completed task. This page explains why, when compression can help or hurt, and how to measure it on your own work.

October 13, 2026 · Guide

In short: a tokens-removed counter cannot tell you whether your bill went down. Cached prefixes are billed at a fraction of fresh input; cache writes cost a premium; output tokens are untouched; extra turns re-send the whole prefix. Compression can help when it shrinks new bulky results before they are cached, without rewriting earlier turns. Measure cache-aware cost per solved task yourself. This page does not claim SuperCompress has been shown to lower anyone’s bill; it describes a design that follows that cache-friendly pattern.

Why fewer tokens is not a lower bill

A coding agent is a loop. The model asks for a tool, the harness runs it, and the result is appended to the conversation. The next request sends that whole conversation back. Most of what you pay for is the prefix being replayed, not the one new file.

Providers do not price every input token the same. Anthropic’s prompt-caching docs price a five-minute cache write at 1.25 times the base input rate, a one-hour write at 2 times, and a cache read at 0.1 times for most models. OpenAI’s prompt-caching guide uses the same shape on GPT-5.6 and later: cache writes at 1.25 times uncached input, subsequent reads at 0.1 times on most of those models. A cache hit is cheap. Busting the prefix and writing it again is not.

Three other facts sit next to that pricing. Compressing what the model reads does not shrink the tokens it writes, which are billed at the output rate either way. If compression drops a line the agent needed for an exact edit, the model re-reads or retries; each extra turn pays the prefix again, plus new output. And a tool that only intercepts shell stdout never sees built-in Read, Grep, Glob, or most MCP results, so a large reduction on that slice can be a rounding error on the session.

What independent measurements show

These studies do not all test the same tools. Several are written by vendors; that is noted. What they share is paired sessions and a bill, not a counter on one compressed blob.

None of this says compression can never pay — Song’s cache-preserving arm did. Chen and Shi (Paritok; disclosed) argue that shrinking file reads can compound over a long session, and that recalling the original spends that saving back. Payload token reduction is not a forecast of the invoice.

When compression can help, and when it can raise the bill

Help: compress new content before its first cache write. The first time a log, grep dump, or MCP result enters the conversation, it is written to the cache at the write rate and then re-read cheaply. Making that first write smaller, without changing anything already cached, is the case the pricing tables reward.

Hurt: rewriting or summarising history. Changing bytes behind the cache breakpoint turns a cheap read into a new write, and the rest of the prefix is billed as fresh until the cache is rebuilt. PointFive’s 2026 prompt-compression guide puts it plainly: a compressed prompt that misses the cache can cost more than an uncompressed prompt that hits it. Evaluate caching and compression together.

Hurt: coverage that misses the real tokens. Command-output filters help with noisy git, test, and build stdout. They do not see Claude Code’s built-in Read, Grep, and Glob paths, or most MCP results, unless those run through the shell. Glia, the JetBrains trial Rakuen cites, and codepointer all run into that gap. If your sessions are mostly file reads, a shell-only saving will not show up on the bill.

Hurt: lossy summaries that the agent must repair. Coding agents apply patches by matching exact lines. Torana documented re-read loops after summarising file reads; PointFive documented ranked search summaries breaking shell pipelines that expected original grep lines. Extractive keeping of original lines avoids that class of failure; abstractive summaries have to prove they do not introduce it.

How to measure it yourself

Do not multiply a token-reduction percentage by your whole bill. That product assumes every token is uncached input and that the agent takes the same number of turns. A workable test:

  1. Pair the runs. Same repo, same task, same model and effort, with and without the tool. Repeat, and randomise order inside each pair. Keep an uncompressed control; client and model drift will move the bill on their own.
  2. Score the work, then the money. Count a run only if the task was actually solved. daseinlabs/code-compression-bench ranks layers by cost per solved task: cache-aware total cost divided by tasks the grader passed. A cheaper run that fails the task is not a saving.
  3. Use the provider’s usage fields. Uncached input, cache writes, cache reads, and output, each at that model’s published rate. A “tokens saved” counter that never sees cache or output cannot contradict the invoice.
  4. Count failures and extra turns. Extra file reads and extra tool calls are how a local saving disappears. If the treatment side takes more turns, ask whether the compressor dropped something the agent had to go back for.

For how the different tool families act, see context compression for coding agents.

Where SuperCompress sits

SuperCompress is hosted, extractive, and query-aware. It compresses new bulky tool results and other large context — logs, diffs, file reads, MCP results — before those bytes enter the conversation, and it leaves earlier turns untouched. That is the cache-friendly pattern: shrink the live tail, do not rewrite the cached prefix. The agent sends the bulky block as context and the current question as query. SuperCompress keeps the original lines that answer that question and drops the rest, so file paths, error messages, IDs, and code come through as the tool returned them. The question itself is never compressed. Every response reports original_tokens and kept_tokens. This page does not claim SuperCompress has been shown to lower anyone’s bill; the only honest number is a paired measurement on your sessions.

Install

One command finds the coding agents on your machine and adds SuperCompress to each of them:

npm install -g supercompress-proxy && supercompress setup

Then run supercompress doctor to check what is connected. The full harness list is in the coding agents guide.

FAQ

Does context compression lower your bill?

Not automatically. Paired tests keep finding that a large drop in tokens on one payload can sit next to a flat or higher session bill. Measure cache-aware cost per solved task on your own work.

Why does prompt caching change the math?

Agents resend the conversation prefix every turn. A cache hit is billed at a fraction of fresh input; a new cache write costs a premium. Input compression does not change output tokens. Rewriting earlier turns turns a cheap read into an expensive write.

How should I measure a compression tool?

Run the same tasks with and without it. Compare cost per solved task from provider cache-read, cache-write, uncached-input, and output usage. Count failures and extra turns. Do not multiply a tokens-removed percentage by your whole bill.

Does SuperCompress rewrite earlier turns?

No. It compresses new bulky tool results and context before they enter the conversation and leaves earlier turns untouched. It keeps the original lines that answer the current question and drops the rest.

Can I use SuperCompress with Claude Code, Codex, or Cursor?

Yes. Run npm install -g supercompress-proxy && supercompress setup, then supercompress doctor.

Get API key Coding agents guide Approaches compared