Cover: 7 GitHub repos that shrink your token bill

Most of what a coding agent reads never helps it. A long test log, a huge JSON response or a whole file pulled in for one function all land in the context window, and you pay for that text on every turn after it arrives. Long sessions get expensive and, once context fills, the agent starts forgetting what it was doing.

The seven repos below attack that waste from different sides. Some compress tool output, some find code more cheaply, some stop the agent from writing too much, and one changes the model you run. They overlap, so you won't want all of them. Pick by where your tokens are going, which the last section shows you how to measure.

Every entry below was found through the @RoundtableSpace feed on X, then checked against the project's own page on 4 November 2026. Numbers quoted are the projects' own claims. Read each license and README before you depend on anything here.

ProjectBest forLicense
Context ModeKeeping tool output out of contextElastic 2.0
HeadroomCompressing everything before the LLMApache 2.0
JevgrepFinding the right files for lessMIT
Claude-MemRemembering across sessionsApache 2.0
PonytailMaking the agent write less codeMIT
book-to-skillTurning long documents into on-demand skillsMIT
Open InterpreterRunning a coding agent on cheaper modelsApache 2.0

1. Context Mode

mksglu/context-mode

Context Mode is a free, local plugin for 10 coding agents. It keeps tool output out of your agent's context window and keeps usage data on your machine. Hooks, a sandbox and search run as local processes next to the agent, and each project gets its own database under ~/.context-mode.

The idea worth stealing is what the README calls Thinking in Code. The agent writes a short script to process the data instead of reading the data, and only what the script prints reaches the context. If an agent needs to know how many log lines contain an error, it counts them with code and receives one number. It doesn't read fifty thousand lines to do the same job in its head.

The project reports that on the 36 bench rows with 10 KB or more of raw output, the plugin's median reply is 99.4% smaller than the raw output. Treat that as the upper end, since it only covers large outputs. It works offline after install, using local SQLite and your own runtimes.

One licensing note: the plugin uses the Elastic License 2.0, which is source-available and not an OSI open source license. A separate hosted product called Context Mode Gateway has its own account and subscription, and you don't need it for the plugin. Install with npm i -g context-mode@next and follow the steps for your agent.

2. Headroom

headroomlabs-ai/headroom

Headroom compresses what your agent reads (tool outputs, logs, RAG chunks, files and conversation history) before it reaches the model. Compression runs on your machine, and no prompt or file content is sent anywhere to be compressed.

Its numbers are unusually honest. The README reports 21 to 57% fewer input tokens on four agent scenarios, 90% or more on repeated JSON arrays and log lines, and little on prose. That spread tells you where it will help. If your agent mostly reads structured, repetitive output, the savings are large. If it mostly reads prose documents, expect little.

You can use it four ways. As a library, compress(messages) works inline in Python or TypeScript. As a proxy, headroom proxy --port 8787 needs no code changes. As an agent wrapper, one command covers tools such as Claude, Codex and Cursor:

uv tool install --python 3.13 "headroom-ai[all]"
headroom wrap claude

Undo with headroom unwrap. There is also an MCP server, cross-agent memory, and a headroom learn command that mines failed sessions and writes corrections. Of everything in this list, it's the easiest to test: wrap one agent for a day, compare your usage, and unwrap it if you see no change.

3. Jevgrep

dzhng/jevgrep

Coding agents spend part of every unfamiliar task hunting for the right files. Jevgrep gives them a starting point: ask a repository question, and jg returns relevant files, reading leads and verbatim source excerpts in one response. Your agent then does the implementation and testing.

Its headline claim is the same intelligence at about 30% lower cost. In the project's ten-task SWE-bench comparison, Jevgrep completed the same 8 of 10 tasks as the baseline at lower cost. Ten tasks is a small sample, and the authors say so by giving the number, so treat this as promising more than proven.

Setup has one trap. Installing the CLI alone doesn't teach your agent to use it, so you must install the skill too:

npm install -g @dzhng/jevgrep
jg auth
jg skill

It needs Node.js 22 or later and a key for a provider such as Vercel AI Gateway or OpenRouter, because it judges relevance with a model of its own. So it adds a small cost of its own in order to save a bigger one. That trade pays off in large unfamiliar repos and may not in a small project your agent already knows.

4. Claude-Mem

thedotmack/claude-mem

Claude-Mem is a persistent memory compression system built for Claude Code. It captures tool usage observations, generates semantic summaries, and makes them available to future sessions, so the agent keeps continuity after a session ends.

This saves tokens indirectly. Without memory, each new session spends its first thousands of tokens rediscovering the project: reading the same files and asking the same questions. A compact summary replaces that exploration. Install with npx claude-mem install.

Read the defaults before you commit. Some install paths default to a hosted memory called CMEM Pro, and a local observer is opt-in through a flag. If your code is confidential, check where observations are stored and sent for your setup. Memory is also a place where stale facts live. A summary that says a function exists after you deleted it will mislead the next session, so review what gets stored from time to time.

5. Ponytail

DietrichGebert/ponytail

Ponytail is a skill with a character: the senior engineer who looks at your fifty lines, says nothing, and replaces them with one. Most token tools cut what the agent reads. This one cuts what it writes, which also reduces what you have to review.

The README reports minus 53% code, minus 41% time, minus 26% cost and minus 45% tokens in a Claude Code benchmark of 39 tasks, including a real FastAPI and React repo, at five runs each. It also claims that 98% of risky logic ships with a test, against 68% without the skill, and that it passed all 30 runs on six security tasks. The method and per-task tables are published in the repo, which is more than most projects offer.

Its rule is the useful part: write only what the task needs, and never cut validation, error handling, security or accessibility. The README is clear that the code ends up small because it's necessary, and that lower cost is a side effect. You could copy that one sentence into your own project instructions today and get part of the benefit.

6. book-to-skill

virgiliojr94/book-to-skill

Dumping a whole technical book into context to answer one question is about the most expensive thing an agent can do. book-to-skill turns any technical book, document folder or collection of sources into an agent skill that gets loaded on demand. It claims 24 to 51 times fewer tokens than dumping the book into context, measured on real books.

It works in three steps. You point it at a file, folder or glob, for example /book-to-skill ./my-book.pdf. It distills the source into frameworks, decision rules, anti-patterns and per-chapter files. Then, when you ask something like /my-book replication, the agent reads only the right chapter.

This pattern works for more than books. Long API references, internal runbooks and architecture documents all fit, because the cost of a reference document is paid every time it's loaded. Respect copyright while you're at it: use books you own, and don't publish the generated skill. Install with npx skills add virgiliojr94/book-to-skill.

7. Open Interpreter

openinterpreter/openinterpreter

Everything above reduces tokens. Open Interpreter reduces the price of each one. It's now described as a coding agent optimized for low-cost models, and the current README announces a Rust reimplementation of the Kimi Code harness with a Codex-like interface.

Install it with the curl script on macOS and Linux, or the PowerShell command on Windows, then type i or interpreter in your terminal. If you remember the older Open Interpreter project, this is a different shape of tool, so read the current README and not an old tutorial.

A cheaper model only saves money if it finishes the task. A model that costs a fifth as much but needs four attempts has saved you almost nothing and taken up your afternoon. Run a real task from your backlog on both and compare the total spent, including retries.

Measure before you install anything

Guessing where tokens go usually leads to the wrong tool. Run this check for a normal working day:

  1. Note your usage or spend before you start.
  2. Work normally, and write down each session's main task.
  3. At the end of the day, look at which sessions cost the most.
  4. Open those sessions and find what filled the context: test output, file reads, or a long back and forth.

Then match the cause to a tool. Big tool output points to Context Mode or Headroom. Slow file hunting points to Jevgrep. Repeated project discovery points to memory. Large diffs point to Ponytail. Long reference documents point to book-to-skill.

Why one early mistake costs so much

Tokens in a chat session behave differently from tokens in a single request. Each new turn resends the conversation so far, so anything that lands in context early gets billed again on every later turn, unless your provider's caching covers it.

Here is a simple illustration with made-up round numbers. Say an agent reads a 20,000 token log on turn 5 of a 40 turn session. The log appears once in your terminal, but it travels with 35 later requests. That is 700,000 extra input tokens across the session for a file the agent needed once. If a script had printed 200 tokens of useful result, the same 35 turns would carry 7,000 tokens. Caching softens this, but the shape stays the same, and a full context window hurts quality no matter what you pay.

That explains why the tools here focus on the moment data enters context. Cutting a large input early beats any trick you apply later. It also explains why a fresh session is often the cheapest fix of all.

Which of these can run together

Some combinations work well and some waste effort. Context Mode and Headroom both target tool output, so run one first and add the other only if a measurement says there is more to gain. Jevgrep sits at a different point, at the start of a task, so it pairs fine with either. Ponytail changes what the agent writes, so it combines with everything. Memory tools can fight with compression if both try to rewrite the same history, so add memory last and check that sessions still behave.

Add one tool at a time and run it for a few days. If you install three at once and your bill drops, you won't know which one to keep. If something breaks, you won't know which one to remove either.

Finally, watch quality alongside cost. A compressor that hides the one line the agent needed will produce a wrong fix, and a wrong fix costs far more than the tokens it saved. If failed attempts go up after you add a tool, take it out.

Free fixes that need no repo

Several habits save more than any plugin, and they cost nothing:

  • Start a fresh session for each task. Old conversation is resent, and billed, on every turn.
  • Ask for summaries of test runs. A failing test name and the error line are usually enough.
  • Pipe noisy commands through tail or grep before the output reaches the agent.
  • Keep your project instruction file short. It is loaded every session, so every line has a recurring cost.
  • Use a smaller model for mechanical work such as renames, and keep the strongest one for design and debugging.

Check whether your provider already discounts repeated input too. Prompt caching can make a long stable prefix much cheaper, and tools that reshuffle context can work against it. So after you add a compressor, compare your real bill, not only the token count.

If you work with Opus 5.5 and want a written routine for this, my paid Opus 5.5 Coding Workflow & Cost Kit covers how to prove a change works and set up the next session. Its description calls it small and practical, and that matches the point of this list: fewer tokens spent, with evidence.

Sources