Headroom
A context compression layer that sits between your agent and the model. It intercepts what the agent reads before it ships, tool outputs, logs, files, retrieval chunks and conversation history, and compresses it reversibly: the original stays retrievable on demand. The engine is written in Rust, driven from Python or TypeScript, and runs as a library, an OpenAI-compatible proxy, or an MCP server. Apache 2.0 licensed. For Claude Code, installation goes through `headroom wrap claude`, which drops a transparent proxy without touching the project.
Strengths
- Reversible compression: the original text stays retrievable, so you do not lose the data on the way
- Four ways to wire it in (library, proxy, agent wrapper, MCP server) with no rewrite of your code
- Syntax-aware compression for Python, JS, TS, Go, Rust, Java and C, not a blind truncation
Limitations
- The spectacular figure is about JSON: on a coding agent, the repository claims 15 to 20%
- One more local proxy in the chain, so one more suspect when an answer goes sideways
- Python 3.10 or newer required, and unusable in a sandboxed environment where no local process can run
Best for
- An agent swallowing massive tool outputs, code search or debugging sessions, and saturating its context
- A pipeline pushing bulky JSON between tools and model on every turn