Save tokens with headroom

Quick post today.

tl;dr If your problem is that you're reaching the limit quota often, adding a proxy service like Headroom will compress the input tokens and remove the bloat to save tokens.

This week I finally solved a problem that I had very often: reaching the quota of my Chat GPT subscription.

So, to solve this I installed a tool called headroom. A context compression tool that works as a proxy between your model provider and you harness.

![token saved](/images/captura-de-pantalla-2026-11-03-a-la-s-1.23.14 p. m..png "token saved")

Model Provider -> Local Headroom instance -> Harness.

This will let the tool to compress some bloat, and reduce the token input and output.

![Example on how the headroom removes noise](/images/captura-de-pantalla-2026-11-03-a-la-s-12.03.13 p. m..png "token saved")

The setup

I used a Docker image to setup the proxy. You can take the repo: https://github.com/LuisPaGarcia/headroom-setup

After this image is running, you can visit the host http://127.0.0.1:8787/dashboard to see the headroom dashboard.

Next thing, is to apply the proxy URL to the codex or claude config.

In my case for codex I used this configuration:

# added in ~/.codex/config.toml

...
# HEADROOM CONFIGURATION
model_provider = "headroom"
openai_base_url = "http://127.0.0.1:8787/v1"
[model_providers.headroom]
name = "Headroom"
base_url = "http://127.0.0.1:8787/v1"
supports_websockets = true
requires_openai_auth = true

# HEADROOM CONFIGURATION
...

Now, the codex application and instances will take this config as a proxy.

![token saved](/images/captura-de-pantalla-2026-11-03-a-la-s-1.29.29 p. m..png "token saved")

And that's it.\ \ From my experience you must be sure you are saving tokens as much as you can.

Happy hacking!