AI News
All projects
Plugin

TokenEconomizer: a plugin that cuts coding agents' costs by learning each repo

A plugin for coding agents such as Claude Code that learns from a repository's past sessions to cut wasted spending in later ones.

TokenEconomizer by microsoft · 8,132 GitHub stars when we found it · added

TokenEconomizer is a plugin for coding agents, including Claude Code, Codex, the GitHub Copilot CLI and Pi. It offers experimental support for several others. According to the README, it has three mechanisms. Micro-skills remember repository facts, such as which test command works there. Tool pruning leaves out tools a repository never uses. A loop guard redirects an agent stuck on repeated failures. The plugin learns only from sessions in one repository and keeps what it learns on the user's machine.

The README reports measurements on SWE-Bench tasks: mean cost is 18.4% to 30.9% lower across five agent-model combinations. It is cheaper in all 30 repository-by-combination cells, and Pass@1 rises in four of five. The project links to a paper and an experiments folder for reruns, but the numbers are the authors' own. Micro-skills is off by default because its proposer adds model calls. Tool pruning does nothing yet on several agents, including Cursor Agent and opencode.

Setup takes a git clone and a marketplace command for each agent. It needs no API key of its own, since model calls run through the user's agent and their cost is counted in the reports. The README marks the licence as MIT and requires Python 3.10 or newer. Several integrations are labelled experimental and have been tested only on a few versions.

In the author's words

TokenEconomizer makes coding agents cheaper to run in the repositories you work in often, without changing the agent itself.

From the README or the author's post. We checked that the sentence is there, not that it is true.

When to reach for it

A team that runs the same coding agent on one codebase over and over can copy the idea of keeping a per-repository memory of repeated facts and unused tools. Its loop guard also redirects a stuck turn and leaves the decision to stop it to the user, a restrained design worth borrowing.

Works with

Claude CodeCodexGitHub Copilot CLIPiopencode

See it

AI wrote this entry from the project's own README or its author's post. What the project does, and that AI built it where the entry says so, are the author's statements, quoted here. Nobody at IKANGAI ran or tested it. How this list is made