Original post · Original
Rohan Paul@rohanpaul_ai
Title: "TokenEconomizer: Experience-Driven Black-Box Cost Control for Coding Agents"
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.
View this post on X ↗
· UTC+8