Microsoft introduces TokenEconomizer plugin to reduce coding agent costs by up to 30.9%
Microsoft Research and UC Berkeley researchers have unveiled TokenEconomizer, an open-source plugin designed to cut costs for coding agents by up to 30.9%. The tool works with several coding assistants, including Claude Code, Codex, GitHub Copilot CLI, and Pi, without altering model weights or agent code.
Testing on 277 SWE-Bench tasks showed a reduction in mean cost by 18.4% to 30.9% across five agent-model settings. TokenEconomizer operates as an external controller, managing agent behavior through policies set via prompts, tool settings, and event streams. It also employs regex detectors to identify inefficiencies without requiring model calls.
The plugin reduces costs over time, with most repositories becoming cheaper by the sixth task. Results were consistent across different benchmarks, including Web-Bench and CredData, with savings ranging from 16.0% to 21.2%.