- How you use it
- A setting in your project
- What it can do
- installs software · writes files · network · secrets access · runs shell
- What's inside
The option
| Option | AConfig · v0.41.0+wwfix.1Headroom token compression proxy |
|---|---|
| How you use it | A setting in your project |
| What it can do | installs software · writes files · network · secrets access · runs shell |
| What's inside |
What this thread does
As of November 2026, Headroom still compresses agent input locally, but reports from older builds qualify its retrieval guarantees (HetCreep, 29 October). Do first: check that exact content can be retrieved in your client before relying on compression for sensitive details.
What it is
Headroom (headroomlabs-ai/headroom, formerly chopratejas/headroom, Apache 2.0) sits between your agent and the LLM API. It detects the content type and compresses it with a matching method: JSON arrays, source code (AST-aware), and prose (a small local model). Originals are cached on your machine and the model gets a headroom_retrieve tool to pull the full text when it needs it. Compression runs locally; prompts and files are not sent to Headroom's servers.
You can use it as:
headroom wrap claude(also codex, aider, opencode, cline, copilot and others), which starts a local proxy and launches the agent through it. Cursor needs manual setup with the proxy URL;headroom proxy --port 8787for any app;- a Python or TypeScript library, or an MCP server.
It was shared on X by @BharukaShraddha (7 September 2026).
Numbers (as stated by the project)
The README's offline, seeded scenarios show 21% to 57% fewer tokens (code search 21%, GitHub issue triage 30%, codebase exploration 42%, incident debugging 57%), and over 90% on highly repetitive JSON arrays and log lines. Dense prose barely compresses. Its accuracy table shows no detectable change on GSM8K and TruthfulQA at N=100. Run headroom savings on your own traffic; your number depends on how repetitive your tool output is.
When to use it
When most of your spend is input tokens from big tool results: logs, test output, API or database JSON, search results. If your sessions are mostly short prompts and code edits, expect little gain.
Alternatives: trimming MCP tool output at the server, your harness's own compaction, or a leaner harness (see the harness-choice thread).
Caveats
headroom wrapinstalls the Serena MCP server for the wrapped project only if you pass--code-memory serena(off by default). Undo wrapping withheadroom unwrap <tool>.- An anonymous usage beacon is on by default (compression ratios, model IDs, OS; no prompts or code). Turn it off with
HEADROOM_BEACON=offorDO_NOT_TRACK=1. - With OpenCode or another OpenAI-compatible client pointed at a non-OpenAI provider (DeepSeek, OpenRouter), pass
--openai-api-urlwhen wrapping, or your provider key is sent to OpenAI's default upstream and rejected. headroom learncan write notes intoCLAUDE.local.mdorCLAUDE.md; review before committing.- Optional output shaping (
HEADROOM_OUTPUT_SHAPER=1, off by default) changes the system prompt and reasoning effort. Test it on your own tasks first. - Compression can drop a detail the model needed. The retrieve tool helps, but check results on tasks where exact output matters. Retrieval is not guaranteed: HetCreep reported protected-tag content missing from both compressed output and the stored original in issue #4542 (29 October 2026, main source with a 0.42.0 Rust core). As checked 2026-11-14, it was closed on 2026-11-05 by merged PR #4543; the repair is listed in v0.43.1. carminefa reported a Cline retrieval loop with
headroom__headroom_retrievein issue #4585 (30 October, headroom-ai 0.42.0, token proxy mode). As checked 2026-11-14, it was closed on 2026-11-04 by merged PR #4586; a containing release is not established here. These are upstream user reports, not WhatWorks trials.
Sources
Checked against the primary source, the Headroom README and repository metadata (Apache-2.0; the repo is now headroomlabs-ai/headroom and the old chopratejas/headroom path resolves to it): headroom wrap for many agents with headroom unwrap to undo, headroom proxy --port 8787, an MCP server with headroom_retrieve, Cursor listed as manual setup, local runs with originals cached locally, the benchmark table (code search 21%, issue triage 30%, codebase exploration 42%, incident debugging 57%), the GSM8K and TruthfulQA table at N=100 (the README says a TruthfulQA delta of 0.03 is inside the confidence interval), Serena installed on wrap only with --code-memory serena (off by default), the default-on anonymous beacon and its off switches, the --openai-api-url footnote for third-party OpenAI-compatible providers, headroom learn writing to CLAUDE.local.md by default, and HEADROOM_OUTPUT_SHAPER off by default.
Not checked here: the X post by BharukaShraddha (not opened), the AST-aware and small-local-model details of the compressors, and the figure of "over 90%" beyond the README's one-line statement about repetitive content (the README points to a latency benchmark script). Numbers are the project's own, not independently reproduced.
Not for: writing better prompts or trimming system prompts and skills
checked 2026-11-03
Started from a post by @BharukaShraddha, packaged by the editor. Original post
- 01 · YouPaste the line from Try it into your agent.
- 02 · Your agentGets the package and a trial ticket, installs it on a new branch, runs its check.
- 03 · YouApprove a one-line report. Nothing is posted without you.