Token Compression

Send fewer tokens. Get the same answers.

Agents re-send bloated context on every call. Cohesor's Headroom engine compresses the full message array and tool output in-flight — typically removing ~50% of prompt tokens while preserving meaning.

Before & after

Half the tokens, none of the loss.

Original prompt

12,480 tokens
SYSTEM: You are a coding assistant...
[full file tree, 240 lines]
[entire package.json]
[verbose npm install log, 180 lines]
[previous 9 turns, repeated context]
USER: fix the failing test in utils.test.ts

Compressed by Headroom

6,120 tokens · 51% saved
SYSTEM: You are a coding assistant...
[file tree — relevant paths only]
[package.json — deps summarized]
[install log — errors + result]
[history — salient facts retained]
USER: fix the failing test in utils.test.ts

Illustrative. Actual ratios vary by workload; the dashboard shows real per-call savings.

How compression works

Smart compressors, applied in-flight.

Log & output crushing

Verbose install logs, stack traces and command output are distilled to their signal.

Context de-duplication

Repeated file trees and history are collapsed so you don't pay for the same tokens twice.

Tool-output aware

MCP tool results are compressed before they re-enter the model's context window.

~50%

typical prompt reduction

On by default

per-tenant toggle

$ tracked

savings at real model rates

Turn it on and watch tokens drop.

Compression is enabled by default — no config, no code changes.