3/6 · Mapping the token-reduction toolbox
Compare RTK, Tokenade, Headroom and prompt caching by mechanism, integration and evidence. Smaller tool output does not establish a cheaper completed task.
Written by Florian Bruniaux
AI Founding Engineer at Méthode Aristote, 13 years scaling engineering teams from developer to CTO. Builds open-source developer tools, see what else I've shipped.
| TL;DR | What to check |
|---|---|
| Mechanism | Filtering, selecting, delegating and caching change different parts of a session |
| Coverage | A shell hook, an MCP proxy and a model gateway cannot automatically reach the same traffic |
| Evidence | Compare complete tasks, including retries and quality, rather than headline compression ratios |
| Ownership | RTK publishes its source; Tokenade distributes a proprietary engine behind a public installer |
Disclosure: I contribute to RTK. The same standard applies to its claims and its competitors: name the workload, the denominator and the evidence boundary.
A shorter tool response can help an agent finish with less context. It can also make the agent read the original again. The useful comparison starts with the work that changed, then follows every model call needed to finish the task.
The earlier version of this article grouped tools into four exclusive layers. That was too rigid. Tokenade combines command filtering, code navigation, context controls and output instructions; Headroom exposes different integration modes. A product can occupy several rows of the map.

The four-layer map
The four-layer model expands into the mechanisms below. A tool may appear in several categories; compare its integration surface before comparing its savings.
| Mechanism | Examples to investigate | What needs measuring |
|---|---|---|
| Command-output filtering | RTK, Snip, Distill, Tokenade | Output retained, missed details, raw retries |
| Selective reads and navigation | lean-ctx, Serena, Token Savior, Tokenade | Index cost, correct retrieval, extra calls |
| Pre-read middleware | OpenWolf | Whether the agent requests the original when needed |
| Tool discovery and execution | context-mode, Cloudflare MCP, mcp2cli | Loaded schemas, result size, execution and recovery costs |
| Documentation retrieval | Context7 | Relevance and freshness of retrieved documentation |
| Prompt compression | LLMLingua | Input reduction and downstream task quality |
| Output instructions | Caveman, claude-token-efficient, SuperClaude | Output length, readability, omitted requirements |
| Compression and recovery | Headroom, Context Gateway | Cache effects, storage lifetime, retrieval behavior |
| Gateway services | LiteLLM, Bifrost, Edgee | Features enabled and traffic actually routed through them |
| Visual representation | pxpipe | Image billing, exact-string recall, supported models |
| Delegated work | Spotify Portal plugins | Worker cost, latency and verification by the main agent |
This inventory identifies approaches, not independently tested integrations. LLMLingua prunes input before inference; it does not belong in a category that only shortens the model’s answer. Monitoring tools such as ccusage and ccboard help inspect usage; their presence alone does not reduce it.
Deep-dive 1: RTK and Layer 1
RTK filters command output before the agent consumes it. For example, a test run can retain failures while collapsing passing cases. Its Claude Code Bash hook rewrites supported shell commands; native Read, Grep and Glob calls do not pass through that hook. The CLI also exposes compact file reading, including signatures-only output. RTK documentation
rtk gain reports local before/after estimates for the commands it processed. It does not measure the cost of a counterfactual session without RTK. A lower monthly filtering ratio can result from a different command mix or filter behavior; the model’s growing output share does not directly explain a change in this command-only denominator.
Keep the raw result accessible during evaluation. If a filter hides a diagnostic, count the extra read and the time spent recovering it. RTK’s documentation distinguishes reductions in Bash output from reductions in the bill and explains its byte-based token estimate. How RTK savings work
Tokenade covers more surfaces, with a proprietary engine
Tokenade combines filtering with code navigation, MCP proxying, deduplication and instructions for concise answers. Its published Claude Code benchmark configuration includes hooks around tool use and compaction, plus rules encouraging batched operations. This is a broader intervention than a command filter. It also means an aggregate improvement cannot be attributed to one mechanism without testing the components separately. Benchmark integration manifest
The public npm repository contains an installer and launcher. Its LICENSE explicitly describes the software as proprietary, despite the FAQ describing a MIT core. Treat the distributed engine as proprietary until that contradiction is resolved. A public installer does not make the engine auditable. Tokenade licence
Tokenade’s own comparison understates parts of RTK: RTK documents compact file reads and native Windows support. The difference is broader integrated coverage, not the complete absence of file-reading support in RTK. Conversely, a signatures-only reader is not a repository-wide semantic index.
Compatibility must be checked for the exact client. Tokenade’s current table distinguishes Codex CLI from the Codex desktop app, where coverage is mainly through MCP. A check mark for the CLI is not evidence that the app’s native reads or shell calls are intercepted. Product integration table
What the Tokenade benchmark establishes
THOL is maintained by Tokenade’s author, who discloses that relationship. In its published Claude Code 2.1.206 campaign, Tokenade 0.8.13 has a cost ratio of 0.768 against control, versus 1.052 for RTK 0.42.3. Their respective intervals are 0.647–0.900 and 0.913–1.190. Both report 170 successful runs across 17 tasks. The aggregate is a geometric mean of per-task cost ratios. Published results
Those results support a gain for Tokenade within that campaign. RTK’s interval crosses 1; it establishes neither a definite penalty nor equivalence. The experiment compares complete configurations, including behavior-changing instructions. It does not establish which component caused the difference, or predict savings on another model and workload. No independent reproduction is presented here.
Deep-dive 2: the MCP tax
Tool schemas have a context cost, but the amount depends on the client, server and discovery mode. It is incorrect to assign a fixed token tax to every connected server or assume every schema is fully loaded on every turn. Claude Code supports deferred tool discovery. Inspect what the session loads before estimating overhead. Claude Code cost controls
CLI conversion, lazy discovery and code execution are different options. A CLI moves some discovery into commands; an execution tool lets the agent compute over data and return selected results. Both still require usable descriptions, execution time and enough feedback to detect mistakes. A skill can reduce eager instruction loading, but its discovery metadata and invoked content also consume context.
Deep-dive 3: output, and the Max/Pro blind spot
Concise responses can reduce generated tokens. They can also omit the explanation a reviewer needs. Ask for short routine confirmations while preserving assumptions, failures and evidence boundaries. Measure whether brevity changes task completion or review effort before treating it as free savings.
Subscription authentication does not make every gateway technically impossible. Support depends on the client’s routing and authentication interfaces and the gateway’s documented integration. Usage estimates are also different from the fixed subscription charge or usage-credit bill. Verify the exact supported path rather than infer compatibility from the presence or absence of an API key.
Prompt caching: before the tool layer
Caching reuses provider computation for a matching prefix. It does not necessarily remove that prefix from the model’s context window. A compressor that rewrites an established prefix can trade fewer tokens for more cache writes or misses. Evaluate both together.
Keep stable instructions before changing task data where the client allows it. Record fresh input, cache writes, cache reads and output separately, using the provider’s current rates and retention rules. There is no single cache lifetime or pricing multiplier that applies to every provider and model.
Headroom’s recovery approach adds another dependency: retaining an original is useful only if it remains available and the agent retrieves it when needed. TTL, eviction and retrieval failures belong in the test. A smaller compressed payload is insufficient evidence for unchanged answer quality. Headroom source and documentation
What doesn’t work, and measuring first
A byte or character count divided by four is a heuristic, not an OpenAI tokenizer. Its error depends on language and content and need not point in one direction. Use provider usage for billed requests, or identify the tokenizer used for an offline estimate.
Avoid universal pie charts assigning fixed shares to shell output, file reads and model responses. Their shares change by task, and token volume is not cost. Likewise, savings from separate mechanisms cannot simply be added: they may target the same content or change the agent’s subsequent behavior.

What to do Monday
- Select representative tasks with a checkable outcome, including one where an exact detail must survive compression.
- Record the unmodified agent’s usage and result over repeated runs.
- Test one optimizer configuration at a time with the same model, task inputs and cache policy.
- Count failed attempts, retries, worker calls, setup costs and any optimizer subscription.
- Keep the configuration only if the improvement survives at acceptable task quality.
A smaller local payload is useful evidence about a filter. A lower cost per accepted task is evidence about the workflow. On a subscription, also measure usable capacity and review effort rather than promise a lower fixed monthly fee.
Part one covers the context problem; part two covers maintenance. The guide’s context reference tracks the wider ecosystem.
YSNK
- Tools can operate at several points in the same session; classify mechanisms and integration surfaces separately.
- RTK’s local estimates are not an invoice or a complete-session counterfactual.
- Tokenade publishes a broader configuration and favourable vendor-run results, while distributing a proprietary engine.
- Native tool discovery and provider caching affect the cost of third-party optimizers.
- Evaluate complete tasks, including failures and recovery, before combining tools.
Go Further in the Claude Code Guide
Practical resources selected to help you take the next step.
Open-source galaxy
Projects used in this path
Related appearances
Live appearances and podcast episodes about this article.
Related articles
2/2 · Claude selected my output style. Then ignored it
Claude Code selected flow-lean but skipped its footer. A casing fix showed why installation, selection, and behavior need separate evidence.
2/6 · Diagnose and repair context drift
Use L0 to L5 to diagnose context drift, then maintain adherence through observation, repair, and replay instead of treating setup as finished.
1/6 · Opposite AI results: what context can explain
Anthropic measured merged PRs; METR measured task duration in a different setting. What these results and long-context research establish, and what remains a hypothesis.
Go deeper
Step-by-step guides that put this into practice.
Context engineering: the L0-to-L5 playbook
Choose context controls from L0 to L5 according to the failure you observe, from project documentation to scoped rules, behavior checks and shared configuration.
Persistent memory: the six failures that never raise an error
I ran claude-mem for four and a half months. Six things were broken, four of them since March, and none ever raised an error.
Claude Code setup, level by level
Three configuration layers for project context, daily tools and persistent memory, with checks for what loads and how it behaves.