ToolNavs Find Useful AI Tools
Submit Sign in
Back to AI information
TokenEconomizer Goes Open Source: AI Coding Agent Costs Drop by Up to a Third

TokenEconomizer Goes Open Source: AI Coding Agent Costs Drop by Up to a Third

AI information • Admin • • 76 views

On November 17, 2026, UC Berkeley, Microsoft Research, and Microsoft Security jointly released the open-source plugin TokenEconomizer: it learns from an AI coding agent's past sessions in the same repository so later tasks cost fewer tokens — without changing the agent or the underlying model.

Where the money goes: rediscovery, idle tools, failure loops

The team first profiled Claude Code on 60 SWE-Bench tasks, and the waste clustered in three places: once a repository had five completed tasks, 30% of tool calls repeated an earlier action; of the 23 tool descriptions received every turn, 16 were never called; and the 17% of tasks that failed consumed 32% of the spend. The plugin answers with three mechanisms: micro-skills, which compress recurring repository knowledge into one-line notes, added only after several sessions confirm the pattern; tool pruning, which drops tools the history says are unlikely to be used while keeping core tools for running commands and editing files; and failure-loop intervention, which judges whether the agent is truly stuck, suggests a different approach if so, and alerts the developer if it stays stuck.

Measured: 277 tasks, costs down 18.4–30.9%

The evaluation covered 277 real SWE-Bench bug-fixing tasks across six repositories and five agent-model combinations: average cost fell 18.4–30.9%, all 30 repository-combination pairs saved money, and task success rates stayed broadly stable. From the sixth task onward, cumulative cost dropped below the default. On sequential web development, costs fell 16.0–21.2%; on security auditing, where every task uses a new repository, the saving narrowed to 6.4–19.6%.

For teams that use agents in the same repository every day, the saving comes from not paying to rediscover things; but learning needs accumulation, so the first few tasks can cost more, and one-off tasks or new repositories gain less. The plugin needs no API key of its own, and what it learns stays on the developer's machine. How the Claude Code team thinks about verification: 90% of code written by AI — what keeps it from going wrong covers the other side of the coin: who writes the code and how it is checked; this one is about writing it more cheaply.

Recommended Tools

More