Nathan Hodgson
Library
Setup guidesBeginner2 min readUpdated

Headroom: Cut Your Claude Code Token Bill (Full Setup Guide)

How to install Headroom, the free open source tool that sits in front of Claude Code and compresses logs, files and tool output before they reach the model. Same answers for 60 to 95 percent fewer tokens, set up in one command.

Open github.com

If your Claude Code bill keeps climbing, the problem usually isn't your prompting. It's all the noise Claude gets charged to read. Every log, file, and database dump you feed it is full of junk the model never actually uses, and you pay for every token of it. Headroom fixes that. It's a free, open source tool that sits in front of Claude, strips out the clutter, and passes on only what matters. Same answers, far fewer tokens.

What Headroom does

  • Sits between you and Claude as a wrapper or proxy, so you never touch your own code.
  • Compresses logs, files, database dumps, search results and long history into only the tokens that matter.
  • The compression is reversible, so if the model needs the original detail it can pull it back.
  • Runs locally. Your data never leaves your machine.
  • Works with Claude Code, Cursor, Codex, Aider, Cline, Continue and more.

Before you start

  • Python 3.10 or newer installed.
  • Claude Code already set up and working.
  • A terminal. That's it, the whole setup is basically one command.

Step 1: Install Headroom

Install the Python package with everything included:

Terminal
pip install "headroom-ai[all]"

Prefer uv? Use this instead:

Terminal
uv tool install "headroom-ai[all]"

Step 2: Wrap Claude Code

This is the one that matters. Launch Claude Code through Headroom and it sets up the local proxy for you automatically:

Terminal
headroom wrap claude

Now use Claude Code exactly like you normally would. Headroom quietly strips the junk out of everything before it reaches the model, and you start paying for a fraction of the tokens.

Step 3 (optional): Use it with other tools

To plug Headroom into any MCP-compatible tool, run:

Terminal
headroom mcp install

Or run it as a drop-in proxy for any language or framework, with zero code changes:

Terminal
headroom proxy --port 8787

What you'll see

Same answers, 60 to 95 percent fewer tokens on data-heavy tasks. Real workloads have hit 92 percent on code search and SRE debugging, and around 73 percent on issue triage. Nothing changes in how you work. Your bill just drops.