Microsoft researchers and academics at UC Berkeley have released a free, open-source plugin that they say trims the cost of AI-assisted software development by attacking a specific kind of waste: the repeated work coding agents do every time they start a session.
The tool, called TokenEconomizer, first shipped on Oct. 26 under the MIT license. It sits alongside an existing coding agent without altering the agent’s underlying model, weights or code, and it draws on the user’s existing subscription plan or login rather than requiring a separate API key. Microsoft reports that across 277 SWE-Bench tasks spanning six repositories, mean costs fell between 18.4% and 30.9% depending on the configuration.
The savings did not come with a uniform improvement in results. In the Claude Code setup running Anthropic’s Opus 4.8, first-pass success, or Pass@1, slipped to 73.0% from 74.0% even as mean cost dropped 30.9%. The other four configurations tested posted both lower costs and higher first-attempt pass rates.
Agent and modelMean cost changePass@1 with pluginPass@1 without pluginClaude Code, Sonnet 5-23.6%76.0%74.7%Claude Code, Opus 4.8-30.9%73.0%74.0%Codex, GPT-5.6 Terra-24.7%74.7%73.8%Codex, GPT-5.6 Sol-26.1%81.7%80.1%Copilot CLI, Sonnet 5-18.4%77.6%75.0%
Note: Costs reflect the plugin’s controller calls and are measured against an unmodified agent running at high reasoning effort, with three seeds per agent-model setting.
The researchers said costs declined in all 30 repository and agent-model combinations they examined. Supported agents include Claude Code versions 2.1.300 through 2.1.329, Codex 0.153.1 through 0.171.0, GitHub Copilot CLI 1.0.83 through 1.0.114 and Pi 1.2.0 through 1.5.2. The plugin requires Python 3.10 or later. Experimental support exists for Cursor Agent, Grok Build, opencode, Hermes Agent, Antigravity CLI and Factory Droid, with Cursor limited to macOS and Linux.
Three mechanisms drive the savings. The first, an optional feature called micro-skills, is switched off by default. When enabled, it records repository facts that surface repeatedly across sessions, such as which test commands work, which environment variables are required and where files are located. Once three sessions have confirmed a fact, the plugin can supply it at the start of a new session; contradicted facts are discarded. The learned state is stored locally in the TokenEconomizer folder and kept separately for each agent and repository, so knowledge gathered under Claude Code does not carry over to Codex.
The second, tool pruning, is on by default. Coding agents often load definitions for tools they never call, and the plugin tracks usage within a repository and can drop a tool from context after qualifying sessions in which it goes unused. Removed tools can be restored. Pruning is not available on Pi or on the experimental integrations.
The third is a failure-loop guard that watches for patterns such as an agent rerunning a command after minor edits. When a loop is suspected, a judge model checks the situation and may send a short instruction suggesting a different approach. If the agent still cannot recover, the plugin tells the user how to halt the turn rather than stopping it on its own; the published research used a controller that could terminate benchmark runs, while the installable version leaves that call to the operator.
Microsoft also published results pairing the plugin with two external tools, RTK and RepoMap. The combinations produced mixed outcomes. With RepoMap, the two Codex configurations scored below their respective baselines: GPT-5.6 Terra reached 73.5% Pass@1 against a 73.8% baseline at 21.9% lower cost, and GPT-5.6 Sol hit 79.0% against 80.1% at 29.2% lower cost. The Claude Code pairs improved on both measures under RepoMap, including Opus 4.8 at 75.1% Pass@1 with 24.9% lower cost.
ConfigurationRTK cost change / Pass@1RepoMap cost change / Pass@1Claude Code, Sonnet 5-23.5% / 76.4%-18.3% / 76.7%Claude Code, Opus 4.8-33.2% / 74.8%-24.9% / 75.1%Codex, GPT-5.6 Terra-23.8% / 75.2%-21.9% / 73.5%Codex, GPT-5.6 Sol-23.3% / 81.3%-29.2% / 79.0%Copilot CLI, Sonnet 5-13.2% / 77.4%-6.3% / 76.8%
Note: Baselines are the same unmodified-agent runs used in the standalone tests.
The approach reflects a broader debate over how much scaffolding an AI agent needs. As models grow more capable, some engineering teams are questioning whether auxiliary layers built to compensate for earlier model weaknesses still earn their keep. Lindy, an AI assistant that connects to email, Slack and calendars, disclosed on Nov. 17 that it rewrote its execution engine to cut per-task costs to $0.045 from $0.089, reduced the slowest 5% of task times to 243 seconds from 441, and lifted its success rate to 83.0% from 82.1%. The company kept safeguards around actions with external consequences, such as verifying with Gmail whether a message actually went out before retrying after a crash.
TokenEconomizer takes a different tack by leaving the model and prompts untouched and targeting duplicated effort instead. The reported figures carry caveats. They come from benchmark tasks, and results on a given codebase may differ. Cursor session costs are unavailable in the reports because that agent’s hooks do not expose per-session token usage. The largest gains are likely to appear where developers work repeatedly in the same repositories; someone who moves constantly between unrelated projects may have less repeated work for the plugin to strip out.
The practical question for engineering teams is whether the cost reductions hold on their own workloads. The published research suggests running the plugin on a frequently used repository for about a week, then reviewing its status reports and comparing costs and task completion against similar work done without it. The savings should be treated as a ceiling rather than a promise, since benchmark conditions rarely map cleanly onto production code.
For buyers of AI coding tools, the release adds a new variable to procurement decisions that have largely focused on model quality and per-token pricing. A free plugin that claims double-digit percentage cuts in agent spending, even with modest trade-offs in first-pass accuracy, could shift how teams budget for agentic development and how they evaluate the harness layer surrounding the model itself. The Opus 4.8 result in particular shows the trade-off is not always favorable: lower cost accompanied by slightly weaker first-attempt performance means some teams may prefer the unmodified agent for tasks where accuracy matters more than expense.