Tokenade Goes Open Source: A Token Optimizer for Coding Agents, and Why It's Free

Tokenade 2.0 open sourced: compresses agent context locally, saving an average of 39% Tokens on long sessions.
Tokenade 2.0 is officially open sourced under a dual MIT/Apache-2.0 license. The author originally attempted to run it as a paid product but found that subscription users can't perceive Token bills and pay-as-you-go API developers need a proxy form instead, so they abandoned sales and made it free. The tool locally intercepts the redundant consumption of coding agents: compressing noisy command output, replacing whole-file reads with structural information via commands like map, query, skeleton, and semantic, purifying PDF and web content, and collapsing and deduplicating tool results in history through a local llm-proxy. The author's self-maintained THOL benchmark shows an average 39% cost savings on Claude Code for long sessions exceeding 200k Tokens, with raw data publicly verifiable. Installation requires only a global npm install plus tokenade install, and the dashboard shows savings by category.
From Paid Product to Open Source Tool: A Pragmatic Pivot
Tokenade has officially gone open source with version 2.0, released under a dual MIT OR Apache-2.0 license, with the code hosted on GitHub. The author originally attempted to run this Token optimizer for coding agents as a paid product, but ultimately chose to make it free and open. This decision wasn't driven by idealism, but by a sober assessment of market realities.
The core contradiction lies in the misalignment of willingness to pay. Most users access Claude Code, Cursor, or Codex through subscriptions—they never directly face a Token bill, so a tool that "helps you save Tokens" is solving a problem they can't perceive. The people who actually pay per Token are developers calling APIs directly, and for them, the most valuable form of such a tool would be a proxy layer sitting between the agent and the model provider—something the author explicitly states they have no interest in operating.
So "letting the code speak for itself" became the most honest path forward. This self-negation of the business logic actually gave Tokenade a clearer positioning: infrastructure for the developer community, rather than a product requiring sales pitch packaging.
What Tokenade Actually Does: Intercepting Redundant Consumption Locally
The cost structure of coding agents has an easily overlooked characteristic: what you're paying for is "reading volume," and every round of conversation re-reads the same things—build logs, test output, entire files that were opened once and left in context. Tokenade chooses to intervene at this level, with all processing done on the local machine.
Command Output Compression
When an agent executes a command with noisy output, Tokenade compresses it before the model reads the result. When full output is needed, you can bypass compression with tokenade raw <cmd>. This design preserves traceability during manual debugging, avoiding the awkward situation where "optimization loses critical information."
Tokens and Context Windows: In Transformer-based large language models, a Token is the smallest billing and processing unit after text is segmented, roughly equivalent to 0.75 of an English word or 1 to 2 Chinese characters. A model's context window is the total Token limit that can be held in a single inference, including system prompts, conversation history, tool return results, and the current round's input. The key point is that most model APIs charge by input Tokens, and each round of an agent's loop re-sends the entire history, causing the same build log or file content to be billed repeatedly. This is exactly the "repeated reading" cost structure that Tokenade targets: the optimization target isn't the length of a single request, but the ever-accumulating redundant history in long sessions.
Finding Code Without Reading the Whole File
The commands tokenade map, query <symbol>, skeleton <file>, and semantic "<question>" let agents obtain the structural information they actually need, rather than stuffing entire files into context. This is a rebuttal to the conventional wisdom that "bigger context windows are always better"—in many cases, the agent only needs to know function signatures and file skeletons.
Code Structure Indexing and Semantic Retrieval: The traditional approach sends entire source files into context and lets the model locate the needed code itself, at the cost of billing large numbers of irrelevant lines and crowding the window. Structural queries take a different path: parse code offline first, extract skeleton information such as function signatures, class definitions, and import relationships to form a lightweight index; query <symbol> precisely locates by symbol name, while semantic "<question>" uses vector embeddings to retrieve relevant snippets at the semantic level. Combined, the agent can first get a map of "what functions exist and where they are distributed," then read specific implementations on demand, thereby spending its context budget on the truly relevant code. This approach is especially effective for large repositories, because the cost of whole-file reading grows linearly with codebase size, while structural queries remain essentially stable.
Purifying Documents and Web Pages
tokenade read converts PDFs, spreadsheets, or long documents into genuinely valuable text; tokenade web and tokenade search do the same for web pages and search results. This addresses another type of hidden waste: handing entire HTML pages to the model, most of which consists of navigation bars and ads.
A Local Proxy for API Users
tokenade llm-proxy runs locally between the agent and the provider, collapsing tool results already in history and sending identical tool outputs only once. The author's attitude is very open: either use it or fork it.
The installation experience has also been simplified: tokenade install automatically detects existing agents on the machine and completes integration, with no manual configuration needed.

LLM Proxy Layer and Tool Result Collapsing: The local proxy sits between the agent process and the model provider's API, intercepting and rewriting the request body before forwarding, with no need for users to modify agent code. It mainly does two things: first, deduplication—keeping only one copy of identical tool outputs in history (such as repeated execution results of the same command), replacing the rest with references; second, collapsing—compressing verbose tool returns from earlier rounds into summaries or placeholders, since the model usually only needs to know "what was executed and roughly what the result was." This approach complements provider-side prompt caching: caching reduces the unit price, while collapsing reduces the number of billed Tokens. Because the proxy runs locally, request content doesn't pass through third-party servers, making audit and compliance boundaries clearer.
Performance Data: Where the 39% Average Savings Come From
The author maintains a public benchmark called THOL, specifically for evaluating Token framework optimizers. On Claude Code, for long sessions exceeding 200k Tokens, Tokenade reduces Token costs by an average of 39%. The author specifically emphasizes that this is an average, not an upper limit, and that all raw run data is publicly available on the leaderboard page.
This figure needs to be understood in context. Long sessions are precisely the scenario where the repeated reading problem is most severe—the longer the history, the more content gets re-billed each round, and naturally the greater the optimization space. For short sessions or one-off tasks, the gains narrow significantly. The existence of a public benchmark and raw data at least allows this figure to be independently verified, rather than remaining at the level of marketing talk.
Benchmark Reproducibility: The effectiveness of Token optimization tools depends heavily on workload characteristics, so single-point numbers are easily distorted. A credible benchmark typically needs to publish the task set, model versions, session length distribution, and raw billing data, enabling third parties to rerun and verify. THOL uses a leaderboard format, making the raw Token consumption of each run public, so readers can judge whether the 39% average holds in their own scenarios. Note that averages are pulled up by long-session samples; if your own projects are mainly short tasks, actual gains may be far below this figure—conversely, debugging sessions lasting several hours may exceed the average. This is also why the author emphasizes "run the dashboard once and you'll know."
Getting Started and the Feedback Loop
Installation requires just two commands:
npm install -g @tokenade/cli
tokenade install
After running a long session, tokenade dashboard displays savings by Token category and model. The feedback path the author provides at the end is also direct: if nothing was saved, open an issue with the command or configuration explaining why; if it helped, give the repository a star. This stance of "feedback welcome even when it doesn't work" is especially important for optimization tools—because Token distribution varies enormously across project structures, and a strategy effective for long sessions may not apply to all workflows.
An Industry Signal Worth Noting
Tokenade's pivot reflects a reality in the AI coding tool ecosystem: optimization around Token costs is shifting from "optional efficiency tool" to "part of the infrastructure," and infrastructure's fate is often to be open source and free. As model providers themselves compress context and agent frameworks build in more intelligent trimming mechanisms, the survival space for independent optimizers depends on whether they can differentiate on the dimensions of being local, cross-agent, and auditable. Tokenade's choice to go open source is both an abandonment of the paid model and a bet in this direction.
For developers, the practical value lies in having one more option they can verify themselves. 39% is the benchmark average; how much your own project can save—run the dashboard once and you'll know.
One-line Summary
Tokenade 2.0 open sourced: compresses agent context locally, saving an average of 39% Tokens on long sessions.
Paragraph Summary
Tokenade 2.0 is officially open sourced under a dual MIT/Apache-2.0 license. The author originally attempted to run it as a paid product but found that subscription users can't perceive Token bills and pay-as-you-go API developers need a proxy form instead, so they abandoned sales and made it free. The tool locally intercepts the redundant consumption of coding agents: compressing noisy command output, replacing whole-file reads with structural information via commands like map, query, skeleton, and semantic, purifying PDF and web content, and collapsing and deduplicating tool results in history through a local llm-proxy. The author's self-maintained THOL benchmark shows an average 39% cost savings on Claude Code for long sessions exceeding 200k Tokens, with raw data publicly verifiable. Installation requires only a global npm install plus tokenade install, and the dashboard shows savings by category.
Related articles

Random Pruning of the DPO Computation Graph: 1.4x Training Speedup and Lower Peak Memory
DPO training too slow and memory-hungry? This paper proposes a random pruning framework for the DPO computation graph, sampling independently across position, sequence, and branch dimensions; branch pruning achieves a 1.426x step-time speedup and cuts training time by about 30%, with in-depth attribution of memory and time gains.

Why Does JEPA Underperform MLM in Longitudinal EHR Representation Learning?
New study compares JEPA and MLM for longitudinal EHR representation learning on MIMIC-IV: three JEPA variants train stably without collapse but underperform MLM; target size, not heterogeneity, drives prediction error.

Transfer Learning + Visible Light Communication: A New Approach to Energy-Efficient Indoor Positioning
A study proposes a transfer learning-based visible light communication indoor positioning method, achieving 47% accuracy improvement on the BOSCH factory dataset, 67.5% model efficiency under high noise, and introducing the ME composite metric for energy-efficient positioning in energy-constrained industrial IoT scenarios.