🤖 TokenEconomizer: Microsoft Teaches Coding Agents to Save Tokens

An open-source plugin from Microsoft Research, UC Berkeley, Microsoft Security, and Voyage AI acts as a black-box controller on top of the agent and learns from past sessions in the same repository: micro-skills, tool pruning, and breaking error loops cut empty calls.

🌍 Profiling Claude Code: after 5 tasks, 30% of tool calls duplicate previous steps, and 17% of failures consume 32% of expenses. On 277 SWE-Bench tasks, savings are 18.4–30.9% with the same Pass@1, but on security audits in new repositories, savings are lower: 6.4–19.6%.

👤 It installs alongside Claude Code without a separate API key, learns from session logs in your repository, and pays for itself from the 6th task; data remains on your machine.

Source 1: https://www.microsoft.com/en-us/research/blog/tokeneconomizer-learning-from-experience-to-make-ai-coding-agents-more-efficient/ Source 2: https://github.com/microsoft/TokenEconomizer