Skip to content
Agents · Dec 2, 2026

Microsoft Research plugin cuts AI coding agent costs by up to 31% by learning from past sessions

TokenEconomizer, an open-source plugin from Microsoft Research and partners, reduces token waste in AI coding agents by adapting to repository-specific patterns without altering the agent or underlying model.

Trust79
HypeLow hype

1 source · cross-referenced

ShareXLinkedInEmail
TL;DR
  • TokenEconomizer is an open-source plugin that reduces token waste in AI coding agents by learning from past sessions in the same repository.
  • Across 277 real bug-fixing tasks, it cut costs by 18.4–30.9% across five agent–model combinations without reducing task success rates.
  • The plugin adapts to repository-specific patterns using micro-skills, tool pruning, and failure-loop intervention, with savings growing as experience accumulates.
  • Evaluated on SWE-Bench and extended to web development and security auditing benchmarks with measurable cost reductions.

AI coding agents frequently repeat work across sessions in the same repository: rediscovering facts, loading unused tools, and revisiting the same failures. Microsoft Research and collaborators propose TokenEconomizer, an open-source plugin that learns from past sessions to reduce this waste without modifying the agent or its underlying model.

In experiments on 277 SWE-Bench bug-fixing tasks across six repositories and five agent–model combinations, TokenEconomizer reduced average cost per task by 18.4–30.9% while broadly maintaining task success rates. Savings grew as the plugin accumulated experience, with cumulative costs falling below default by the sixth task in every repository.

The plugin operates through three mechanisms: micro-skills that capture repository-specific knowledge as one-line notes, tool pruning that removes tools unlikely to be used based on historical patterns, and failure-loop intervention that redirects agents stuck in repetitive loops. All three contribute to savings, with the combined approach delivering the largest reductions.

TokenEconomizer’s reported savings account for its own model call costs. On SWE-Bench, the plugin achieved cost reductions across all 30 repository–agent combinations tested, outperforming fixed cost-saving strategies that did not adapt to the repository. Similar savings were observed in sequential web development (16.0–21.2% lower costs) and security auditing (6.4–19.6% lower costs).

The work is documented in the paper TokenEconomizer: Experience-Driven Black-Box Cost Control for Coding Agents, authored by researchers from UC Berkeley, Microsoft Research, and Microsoft Security. The plugin is designed to integrate with existing coding agents, offering a practical route to more efficient agentic workflows in software development.

Sources
  1. 01Microsoft Research — TokenEconomizer: Learning from Experience to Make AI Coding Agents More Efficient
Also on Agents

Stories may contain errors. Dispatch is assembled with AI assistance and curated by human editors; despite the trust-score filter, mistakes happen. We correct publicly — every article links to its revision history. Nothing here is financial, legal, or medical advice. Verify before relying on any claim.

© 2026 Dispatch. No ads. No sponsorships. No paid placement. Reader-supported via Ko-fi.

Built by a person who cares about honest AI news.