Environment-aware controller cuts coding agent token costs without hurting success

TokenEconomizer learns per-repository policies from completed traces, pruning unused tools and interrupting failure loops to save 6.4 to 30.9 percent of tokens across three commercial coding agents.

Independent
Aaron J. Li · Weijia Xu · Chandan Singh · Zixiao Chen · Jeevana Priya Inala · Charlotte Siska · +5 more
Research Digest··2 min read
The authors evaluate coding agents over sequences of repository tasks and find that fixed cost-saving strategies work unreliably, so they build TokenEconomizer, an external controller that learns from past executions.

The authors profiled token use of Claude Code, Codex, and GitHub Copilot CLI on 60 SWE-Bench tasks across 6 repositories, testing three fixed strategies from popular plugins: command-output compression (Rust Token Killer), semantic navigation (Serena), and structural context injection (Aider's repository map).

§