From the source
- UC Berkeley,
Microsoft Research and
Microsoft Security have released TokenEconomizer, an open-source plugin that learns from an agent's past sessions in a repository to cut token waste in later ones.
- Developers return to the same codebases day after day, yet agents often start each session from scratch, rediscovering familiar facts, loading unused tools and repeating unsuccessful approaches.
- Across 277 real bug-fixing tasks from six repositories and five agent and model combinations, the plugin lowered average cost by 18.4–30.9% and saved the most in all 30 repository-combination pairs without performance loss.
- It works through three mechanisms: micro-skills that capture repository-specific knowledge in one-line notes, pruning of tools history suggests the agent will not use, and intervention when an agent keeps hitting the same failure.
- Savings grow as experience accumulates, with cumulative costs falling below the default in every repository by the sixth task, and they carried over to sequential web development, where costs were 16.0–21.2% lower on Web-Bench.
- The plugin runs alongside existing agents without modifying their underlying models, requires no API key of its own, and keeps what it learns on the developer's machine.






