cd /news/ai-tools/show-hn-token-compression-cli-to-sav… · home › topics › ai-tools › article
[ARTICLE · art-142703] src=news.ycombinator.com ↗ pub= topic=ai-tools verified=true sentiment=↑ positive

Show HN: Token compression CLI to save Codex/Astra costs

Yolanda and Spencer released a free CLI token compression tool for Codex that cuts input tokens by 29.6% and saves up to 30% on costs, after they burned $700/day per person on API usage. The tool uses a proxy and a fine-tuned Qwen model trained to preserve agent trajectory, removing tool call results before they return to the model while leaving the KV cache untouched. The code is available at github.com/spenmcke/compress and installs via a curl script from install.everestagi.com.

by read1 min views1 publishedSep 30, 2026

Hey HN! Yolanda and Spencer here - wanted to share a token compression tool that we’ve built for ourselves to save 30% costs on codex!

After maxing out sub and burning $700/day per person on api, we fine tuned a compression model to trim codex's tool call output to reduce input token + cache. It cut down tokens by 29.6% and now I just leave it on by default in Codex.

To avoid messing up w/ cache, we use proxy + fine tuned qwen model trained on preserving agent trajectory to remove tool call results before they go back to the model, leaving kv cache untouched.

The cli is free for everyone to use (https://github.com/spenmcke/compress). Just lmk ur feedback and hacks to shave even more costs on astra! If you want to integrate it into your product to offer the best models at low cost, I can set you up with an sdk and api keys

PS: It’s built for coding agents, not conversational agents. I optimized it for file retrieval accuracy, trajectory preservation, and quality to get up to 30% cost reduction depending on how context-heavy the task is.

On security and privacy side, it's a proxy wrapping your local codex and ZDR so it doesn't retain any queries. It’s on by default in codex and when you don’t want compression, you can use codex --uncompress to disable it.

Give it a try: code is in https://github.com/spenmcke/compress You can install the cli using

curl -fsSL [https://install.everestagi.com/install.sh](https://install.everestagi.com/install.sh) | sh && source ~/.config/everest/shell.sh

Love to hear any feedback and learn your hacky ways to save token costs too!

Comments URL: [https://news.ycombinator.com/item?id=49911910](https://news.ycombinator.com/item?id=49911910)

Points: 5

── more in #ai-tools 4 stories · sorted by recency
── more on @yolanda 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/show-hn-token-compre…] indexed:0 read:1min 2026-09-30 · —