← Back to blog
AiAbout 6 min read

The Token Diet: Coding Agents Are Learning to Say Less

Published Oct 15, 2026
The Token Diet: Coding Agents Are Learning to Say Less

The most popular new trick on GitHub is talking less

The fastest-growing repository on GitHub this week is a Go project called caveman, sitting at more than 112,000 stars, and its entire premise is a joke that happens to be correct. Its tagline reads: why use many token when few token do trick. It is a skill and a proxy for coding agents that claims to cut token usage by about 65 percent by having the model speak like a caveman.

Strip away the bit and you are left with a real engineering claim. Most of what a coding agent sends back and forth is not information. It is scaffolding, politeness, restatement, and the polite throat-clearing that language models do by default. If you can throw that away without throwing away meaning, the session gets cheaper and the context window goes further.

The joke is also the diagnosis. When the winning move is to make the assistant dumber sounding, the bottleneck is not intelligence. It is overhead.

Context is the bill, not the model

It takes a while to internalize how agent workloads actually get expensive. The intuitive model is that you pay per answer, so a long answer costs more. The real model is that you pay per token of context the model has to attend to, and that context grows with every turn.

By the time an agent has read a repository, run a few commands, seen the results, written some code, and read the error messages, the conversation is enormous. Each new turn drags the whole history along with it. The tenth step costs far more than the first, not because the model got slower, but because it is carrying more.

This is why a tool that trims 65 percent of tokens is not a marginal optimization. Applied to an agent running for hours, it is the difference between a session that fits in a budget and one that has to be restarted halfway through.

Two parallel streams of glowing text blocks running across a dark field, the upper stream dense and cluttered while the lower one is sparse and bright, showing the same meaning carried in far fewer tokens

Three ways to attack the same problem

The other projects riding the same wave are attacking the problem from different angles, and comparing them is instructive.

Headroom, a Python project that gained roughly 13,000 stars in a week to reach about 39,000, is a context compression layer that runs as a library, a proxy, or an MCP server. It offers six compression algorithms and claims reductions of 60 to 95 percent. The important design choice is that it is local-first and reversible, which matters because compression that destroys information is worse than no compression at all. Being able to decompress means the agent can still retrieve what it buried.

Xerj goes after a specific and very expensive habit. It is a Rust tool that indexes code, documents, logs, and PDFs with one command, so an agent can query a structured index instead of burning tokens on grep and sed exploration, the search-then-read-then-search again loop that consumes enormous context in exchange for a few relevant lines. The project claims roughly 40 times fewer tokens than grep and stays Elasticsearch compatible, so existing clients keep working.

Put the three side by side and a pattern appears. Caveman changes how the model talks. Headroom changes what gets remembered. Xerj changes where the model looks. The tokens saved are the same tokens, but the lever is different, and mature tooling eventually needs all three.

Why the caveman trick works at all

The caveman approach should not work as well as people say it does, and it is worth understanding why it does.

Instruction-tuned models are trained to be helpful in a particular style. They restate your question before answering. They summarize what they just did. They explain their reasoning in complete sentences, close with a friendly note, and format everything with headers. None of that is required by the task, and all of it is charged by the token.

If you instruct the model to drop the politeness and keep only the load-bearing words, you get output that looks crude and conveys nearly the same thing. The information density goes up because the ceremony goes away. It is the same reason a terse engineer's note can say more in ten words than a meeting agenda says in a hundred.

The tradeoff is real, though. Terse output is harder for a human to skim, and ambiguous shorthand creates misunderstandings that cost more than they save. Stripping the words that make intent explicit is a bet that the surrounding context carries enough meaning, and that bet fails exactly when the task is unusual. Compression helps most on repetitive work and hurts most where nuance matters, which is a rule worth remembering before applying it everywhere.

The supply and demand of attention

There is a structural reason this category is exploding right now, and it has nothing to do with any single repository.

Context windows have gotten large, but so has the appetite for filling them. Agents that read whole repositories, hold long task histories, and coordinate subagents will consume whatever space they are given, because consuming context is how they get things done. Every increase in capacity gets absorbed within weeks, and the pressure returns.

That is a familiar dynamic. Making highways wider does not reduce traffic in the long run, because people respond to the cheaper commute by commuting more. Context is the same. A bigger window does not end the shortage, it redefines what counts as reasonable usage, and the shortage reasserts itself at a higher level.

Which means compression is not a stopgap. It is a permanent layer of the stack, and the projects that get it right will end up in a position similar to databases and caches: invisible, unglamorous, and impossible to remove once people depend on them.

What to actually watch

Star counts are a poor guide here, because a funny name travels faster than a good algorithm. Three things are worth checking before adopting any of this.

The first is reversibility. Lossy compression that cannot be undone makes bugs harder to find, because the agent may be reasoning from a summary that dropped the detail that mattered. The second is where it applies. A proxy that compresses all traffic indiscriminately will eventually eat something load-bearing, and the failure will look like a model hallucination rather than a tooling bug. The third is measurement. "65 percent fewer tokens" is a claim about a specific kind of session, and the only number that matters is the one measured on your own traffic.

The deeper point is that the industry spent two years chasing capability and is now discovering that efficiency is where the next round of practical wins lives. The model that answers correctly is table stakes. The pipeline that answers correctly for a tenth of the cost is a product. Caveman, Headroom, and Xerj all point at the same truth, which is that in agent work, attention is the scarce resource and everything else is bookkeeping.

Related articles