🚀NEW LABGetting Started with Claude AgentsStart lab
← All papers  /  Oct 19, 2026
Agents · Code

TokenEconomizer: Experience-Driven Black-Box Cost Control for Coding Agents

First page
TokenEconomizer: Experience-Driven Black-Box Cost Control for Coding Agents
The curator’s take

Aaron J. Li, Weijia Xu, Chandan Singh, Ion Stoica, Jianfeng Gao and colleagues (UC Berkeley, Microsoft Research and Microsoft Security) evaluate coding agents over sequences of tasks in the same repository and introduce TokenEconomizer, an external controller that cuts the recurring, environment-specific token costs those sequences expose.

Ask this paper

Key points
01

Evaluation setting. Token efficiency is usually measured on isolated tasks. The authors run agents through sequences of realistic tasks on the same project and find costs that recur in each task because the agent rediscovers the same environment facts.

02

Three controls. TokenEconomizer decides which operational micro-skills to inject, which persistently irrelevant tools to prune, and when to intervene in unproductive failure loops. It treats the agent as a black box and needs no model access.

03

Results. Across Claude Code, Codex and GitHub Copilot CLI paired with frontier models, average token cost drops by 18.4% to 30.9% with comparable task success, and savings hold in every repository under every tested agent-model setting.

04

Transfer. On sequential web development and security auditing, costs fall by 6.4% to 21.2% depending on how much structure the tasks share.

05

Why it matters. Most cost work changes the model or the prompt. This shows that a harness-level controller that learns from earlier tasks in the same repository can cut a quarter of the spend on production agents without touching them.

Abstract

Advances in frontier coding agents have sharply increased the token costs of AI-assisted software engineering. Their token efficiency is typically evaluated on isolated tasks, whereas real-world developers use them to continuously build, update, and maintain large-scale projects. This mismatch motivates us to evaluate agents over sequences of realistic coding tasks, where we find that agents exhibit recurring environment-dependent token costs that existing methods struggle to reduce. To minimize these costs, we introduce TokenEconomizer, an external controller that cuts environment-specific token costs over a sequence of tasks. These cuts come from determining (i) which operational micro-skills to inject, (ii) which persistently irrelevant tools to prune, and (iii) when to intervene in unproductive failure loops. Across Claude Code, Codex, and GitHub Copilot CLI paired with frontier models, TokenEconomizer reduces the average token cost by 18.4-30.9% with comparable task success. Savings hold in every repository under every tested agent-model setting and generalize to diverse domains such as sequential web development and security auditing, where costs fall by 6.4-21.2% depending on task structure. Our work establishes adaptive black-box cost control as a promising direction for reducing token costs of coding agents in realistic settings.

Every Monday
Get next week’s papers.
Subscribe on Substack