Microsoft Open-Sources TokenEconomizer to Cut Coding Agent Costs

By ▲ Marktechpost AI (@Marktechpost)Original title: ▲ Microsoft Research and UC Berkeley Researchers just open-sourced TokenEconomizer, a plugin that ma...
78AI Score

Microsoft Research and UC Berkeley have open-sourced TokenEconomizer, a plugin designed to reduce the operational costs of coding agents. By learning repository-specific facts from past sessions, pruning unused tool schemas, and redirecting looping failures, it optimizes context usage. Benchmarks on SWE-Bench show an average cost reduction of 18.4% to 30.9%, albeit with a slight dip in Pass@1 accuracy.

Full Report

▲ Marktechpost AI · 2026-10-30 17

▲ Microsoft Research and UC Berkeley Researchers just open-sourced TokenEconomizer, a plugin that makes coding agents cheaper without changing the agent.

The key idea is learning from past sessions in the same repository. It injects 1-line facts the agent keeps rediscovering, like the working test command. It drops tool schemas the repo never uses. And it redirects the agent when it loops on the same failure.

On 277 SWE-Bench tasks, mean cost fell 18.4% to 30.9% across Claude Code, Codex and Copilot CLI. It was cheaper in all 30 repository-setting cells. RTK alone raised cost in 12 of them, RepoMap in 15. It is a trade-off though: Pass@1 dipped 1.0 point on Opus 4.8, and ReposVul audits saved only 6.4% to 9.3%.

It installs as a plugin for Claude Code, Codex, Copilot CLI and Pi. Apache 2.0, Python 3.10+, no API key of its own......

Full analysis:

推文配图