TokenEconomizer Cuts Coding-Agent Costs Using Repository Experience
Microsoft Research Blog reports that UC Berkeley, Microsoft Research, and Microsoft Security released TokenEconomizer, an open-source plugin that learns from prior coding-agent sessions within a repository without changing the agent or its underlying model. In the team's evaluation across 277 SWE-Bench tasks from six repositories, average costs fell 18.4–30.9% while task success rates remained broadly stable; savings also accounted for TokenEconomizer's own model calls. The plugin uses micro-skills, tool pruning, and failure-loop intervention, with learned data kept locally.
The reported results suggest that repository-specific experience can reduce coding-agent token costs without requiring changes to existing agents or models, although the findings currently come from a single research-affiliated source.
At a glance
- Developers use AI coding agents in the same codebases day after day, yet agents often start each session from scratch: rediscovering familiar facts, loading unused tools, and repeating unsuccessful approaches.
- TokenEconomizer is an open-source plugin that learns from an agent’s past sessions in a repository to reduce waste in future sessions, without modifying the agent or its underlying model.
- Across 277 real bug-fixing tasks, TokenEconomizer reduced costs by 18.4–30.9% across multiple AI coding agents. Costs fell in every repository tested, while task success rates remained broadly stable.
AI coding agents are increasingly helping developers fix bugs and build features largely on their own, but every interaction with their models consumes tokens. In each session, an agent sends instructions, tool descriptions, and session history to its model. Most efforts to reduce this cost focus on individual tasks. Yet developers return to the same repositories, giving agents an opportunity to learn from previous work. Without that learning, an agent may repeatedly rediscover how to run tests, load tools it never uses, or spend dozens of turns revisiting the same error.
#TokenEconomizer#UC Berkeley#Microsoft Research#Microsoft Security#Claude Code#SWE-Bench#Web-Bench