Aube.Tuesday, 24 November 2026Support us

Aube.

News of progress
LabSingle source

A Microsoft plugin cuts coding agents' bills by up to 30.9%

Languages for this article
Original · ENDEESFRITPT

Originally written in English. 6 languages available; yours is one click away.

Illustrative photo: Microsoft Policies
Illustrative photo: Mike Mozart · CC BY 2.0 · Wikimedia Commons

Every day, a developer hands a bug to an AI coding agent in a project the agent has already seen. The agent starts again from zero: it works out how to run the tests, loads tools it will never use and sometimes retries an approach that failed the day before. Each step is billed, and the bill keeps growing. Microsoft Research, with UC Berkeley, has released TokenEconomizer, an open-source plugin that makes the agent learn from its earlier sessions in the same repository. In tests on 277 real bug fixes, it lowered costs by 18.4% to 30.9% across several coding agents, and costs fell in every repository tested.

Agents are billed per token, the chunks of text they send to and receive from their model. The team first profiled Claude Code on 60 bug fixes from SWE-Bench, a benchmark of real bugs in open-source Python projects. Three kinds of waste came up again and again. Once a repository had at least five completed tasks, 30% of tool calls repeated an action from an earlier task in that same repository, while only 7% matched an action from another repository. The agent received 23 tool descriptions on every turn, and 16 of them were never called. Finally, the 17% of tasks that failed took 32% of the spending.

TokenEconomizer reads the log of each finished session and acts through three mechanisms, using only interfaces the agent already exposes. Micro-skills are one-line notes about the repository, added to the agent's starting context only after several sessions have confirmed a pattern, and withdrawn if later evidence contradicts them. Tool pruning removes tools the history suggests will not be needed, keeping the core tools for running commands and editing files; removed tools can be restored. When an agent keeps hitting the same error, a judge model decides whether it is truly stuck. If so, it receives a short note suggesting another approach, and if it is still stuck, the developer is alerted rather than the work being stopped.

Starting with no history, the plugin lowered the average cost per task by 18.4% to 30.9% across five agent-model combinations on six repositories. Early tasks can cost more while it learns, but cumulative costs dropped below the default in every repository by the sixth task. Lowering the model's reasoning effort saved similar or larger amounts, but led to substantial performance degradation. Success rates are the nuance: Microsoft describes them as broadly stable, and Pass@1 rose in four of the five settings, while the setting with the largest saving lost one point. On Web-Bench, a web-development benchmark, costs were 16.0% to 21.2% lower. Gains are smaller on security audits, where each task sits in a new repository and the repository-specific notes do not apply: costs fell 6.4% to 9.3% there, according to MarkTechPost. The figures come from the authors' own measurements.

For a developer who already pays for coding agents, the plugin is open source, works alongside the agent they use, and requires neither a new model nor changes to the agent. Reported savings already include the cost of the plugin's own model calls. The gain builds with use: the same bug, in the same project, costs less the more the agent has already worked there. Teams working day after day on one codebase stand to gain most, while one-off tasks in fresh repositories gain less.

18.4–30.9%lower cost per coding task on 277 bug fixes, in tests (authors' own measurements)

Sources — read the originals(Paris time)

Microsoft Research — blogEN

Pages consulted while writing

0000

Read next

Comments

Loading the thread…

Sign in to leave a comment. Sign in