TokenEconomizer targets a specific source of coding-agent cost: when the same agent works in the same repository again and again, each session pays to rediscover the same facts, resend definitions of tools it never uses, and sit in the same kinds of failing loops. The plugin leaves the agent's model, weights and code alone and learns across a repository's sessions instead.
It has three mechanisms, each of which can be turned on or off. Micro-skills learn repository facts, such as the command that actually runs the tests, from failures that repeat across sessions and from a periodic model review of recent sessions; a fact is stated at the start of a session once three sessions have confirmed it and dropped if later sessions contradict it. Tool pruning removes tools that have gone unused for a set number of prompts or sessions through the agent's own settings, and one command brings them back. The failure-loop guard asks a judge model whether a turn is stuck and, if confident, adds a short redirect; it never stops a turn itself.
The authors report that on 277 SWE-Bench tasks across six repositories and five agent–model combinations, mean cost fell by 18.4–30.9%, with Pass@1 up in four of the five combinations, and that savings held on Web-Bench (16–21%) and two security-auditing benchmarks (6–20%). These are the authors' own measurements from the paper and README, not independent tests.
Installation is from a local clone of the repository through each agent's plugin mechanism (for example the Claude Code and Codex plugin marketplaces, the Copilot CLI plugin command, or pi install). Supported agent versions are pinned to tested ranges in the README, and newer versions are not yet tested. If any part of the plugin fails, the session continues as if it were not installed, and what it learns is stored locally in ~/.tokeneconomizer.
