Berkeley and Microsoft Cut Coding Agent Token Costs by Up to 30.9%
UC Berkeley and Microsoft introduce TokenEconomizer, an external black-box controller that learns from past runs which facts to inject, which unused tools to prune, and when to halt failing loops, changing only prompts and tool settings. Across Claude Code, Codex, and GitHub Copilot CLI on 277 SWE-Bench tasks, it cut mean per-task cost by 18.4% to 30.9% and improved Pass@1 in 4 of 5 agent-model settings.
Related Entities
Full Report
Rohan Paul (@rohanpaul_ai) · 2026-11-16 23
New UC Berkeley and Microsoft paper cuts coding-agent token costs by 18.4% to 30.9% using an external controller that learns from past runs.
by injecting learned facts, pruning unused tools, and stopping failed loops early.
Coding agents are billed by the token, and each turn resends the growing history, so long projects get expensive. Token efficiency is usually measured on isolated tasks, missing the cost that builds up across a sequence of tasks in the same codebase.
TokenEconomizer sits outside the agent as a black box, changing only prompts and tool settings. From past runs it learns which facts to inject, which unused tools to drop, and when to stop a failing loop.
Across Claude Code, Codex, and GitHub Copilot CLI on 277 SWE-Bench tasks, it cut mean per-task cost 18.4% to 30.9%. It improved Pass@1 in 4 of 5 agent-model settings, and savings held in every repository.
Measure agent cost across a whole project, not per task, and use an external controller that adapts to each repo, not fixed plugins.
