Skip to content

TokenEconomizer 0.1.0

Latest

Choose a tag to compare

@aaron-jx-li aaron-jx-li released this 26 Oct 17:03
· 42 commits to main since this release

First release of TokenEconomizer, the plugin from TokenEconomizer: Experience-Driven Black-Box Cost Control for Coding Agents (arXiv 2610.22732).

It makes Claude Code, Codex, the GitHub Copilot CLI and Pi cheaper to run in the repositories you work in often, without changing the agent. It learns from each finished session in a repository and changes what the next sessions there start with.

In the paper's SWE-Bench runs: 18.4–30.9% lower mean cost across five agent–model combinations, cheaper in all 30 repository × combination cells, and Pass@1 up in 4 of 5.

Mechanisms

  • Micro-skills (off by default): repository facts that sessions keep rediscovering, learned from finished sessions and stated at the start of later ones.
  • Tool pruning (on): tools a repository never uses are left out of later sessions through the agent's own settings; toolprune restore gives them back.
  • Failure-loop intervention (on): when a turn keeps hitting the same failures, a judge model checks whether it is stuck and, if so, redirects it. It never stops a turn itself.

Install

# Claude Code, Codex and the Copilot CLI run the plugin from a clone: keep it in place
git clone https://github.com/microsoft/TokenEconomizer.git

# Claude Code
claude plugin marketplace add "$PWD/TokenEconomizer"
claude plugin install tokeneconomizer@tokeneconomizer

# Codex
codex plugin marketplace add "$PWD/TokenEconomizer"
codex plugin add tokeneconomizer@tokeneconomizer

# Copilot CLI
copilot plugin marketplace add "$PWD/TokenEconomizer"
copilot plugin install tokeneconomizer@tokeneconomizer

# Pi
pi install git:github.com/microsoft/TokenEconomizer

Then follow the Quick start for each agent's first-run steps.

Supported versions

Claude Code 2.1.300–2.1.310 · Codex 0.153.1–0.164.0 · Copilot CLI 1.0.83–1.0.102 · Pi 1.2.0–1.3.0 (Pi 0.99.x: load the extension by path)

Project page: https://tokeneconomizer.github.io