← AI news

TokenEconomizer learns from coding sessions to reduce token costs

Brief by TrendCue AI · Dates refer to the original sources.

Microsoft Research and collaborators introduced TokenEconomizer, an open-source plugin that learns from past coding-agent sessions without changing the agent or its model. Microsoft reports lower average token costs on bug-fixing tasks while task success remained broadly stable.

Learning from repository history

Developed by UC Berkeley, Microsoft Research and Microsoft Security, the plugin reads completed session logs and updates repository-specific guidance. It adds short notes when recurring patterns are confirmed, removes tools history suggests are unlikely to be used, and uses a judge model to identify failure loops. If a suggestion does not resolve a loop, the plugin alerts the developer rather than stopping the work.

Microsoft Research

Evaluation and trade-offs

Microsoft evaluated the plugin on 277 SWE-Bench bug-fixing tasks from six repositories, using five agent–model combinations. Each repository started without session history; reported savings include the controller’s own model-call costs. Average cost fell by 18.4–30.9%, though early tasks could cost more while it learned. The paper reports comparable task success across Claude Code, Codex and GitHub Copilot CLI paired with frontier models.

Microsoft Research · arXiv

Beyond bug fixes

Microsoft also reported costs 16.0–21.2% lower on sequential web development in Web-Bench, and 6.4–19.6% lower in security auditing, where every task used a new repository. The plugin keeps learned information on the developer’s machine and requires no API key of its own, Microsoft said.

Microsoft Research

Original sources

Original websites and X posts open in a new tab.

Community vote