aifollow.news
Back Rohan Paul
Rohan Paul· @rohanpaul_ai · X· · Original publication time AI score54

UC Berkeley and Microsoft paper proposes external controller to cut coding-agent token costsMachine translation

AI introduction

The paper proposes TokenEconomizer, which adjusts prompts and tool settings outside the agent. It learns from past runs which facts to inject, which unused tools to remove, and when to stop a failing loop. Across 277 SWE-Bench tasks using Claude Code, Codex, and GitHub Copilot CLI, mean per-task cost fell by 18.4% to 30.9%, while Pass@1 improved in four of five agent-model settings.

Original post · Original

@rohanpaul_ai

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.

Source: Rohan Paul · x.com

Research
Found an error? Send a correction