# TokenEconomizer (slim)

> TokenEconomizer is an Apache-2.0 plugin from Microsoft Research and UC Berkeley that cuts repeat coding-agent cost in a repository by injecting learned facts, pruning unused tools and redirecting stuck turns. It runs in Claude Code, Codex, Copilot CLI and Pi.

- Full: https://www.anchorterminal.com/tools/tokeneconomizer.md (~8,900 tokens) · this version ~1,730 tokens · JSON https://www.anchorterminal.com/tools/tokeneconomizer.json · canonical https://www.anchorterminal.com/tools/tokeneconomizer
- Index: https://www.anchorterminal.com/llms.txt · API: https://www.anchorterminal.com/api/v1/index.json · MCP: https://www.anchorterminal.com/mcp · Updated: 2026-10-31 · pricing https://www.anchorterminal.com/tools/tokeneconomizer#pricing · reviews https://www.anchorterminal.com/tools/tokeneconomizer#reviews
- Licence: CC BY 4.0, credit Anchor Terminal and link this page (https://www.anchorterminal.com/terms/#data)

**B · 62.6/100 · rank #502 of 1244 · #9 in Code & developer platforms · not agent-ready · confidence medium**


Assessment: A standard-library Python plugin that keeps learned state on the machine, documents each hook and makes every action reversible. It is version 0.1.0 with no changelog, installs from a git clone of main, and the 18.4 to 30.9 per cent savings are the paper's SWE-Bench figures, measured with settings that differ from the plugin's defaults.

## Facts

- Kind: Agent framework · vendor: Microsoft · category: Code & developer platforms · legal entity: Microsoft Corporation (repository in the microsoft GitHub organisation with Microsoft's SECURITY.md); co-authors at UC Berkeley · provenance 67/100
- Auth: None · pricing: Free · x402: no · licence: Apache-2.0
- Probe metrics: not measured yet (probes haven't run)
- Surface listed: The microsoft/TokenEconomizer repository at main (version 0.1.0), read from raw.githubusercontent.com, the Wayback Machine's copy of its GitHub page, the project page at tokeneconomizer.github.io and arXiv 2610.22732 on 30 October 2026. Nothing was installed or run
- How an agent reaches it: As a plugin inside the coding agent, through its hooks (Claude Code, Codex, Copilot CLI), an extension (Pi) or a plugin file (opencode, experimental). Commands run as slash commands or from a terminal with `te`. An outside agent can't call it over a network
- Mechanisms and defaults: Tool pruning on (a tool unused over 10 prompts across 2 sessions, or 5 sessions, is denied after an idle hour). Loop guard on (a judge at 0.7 confidence, one redirect per turn, then a notice). Micro-skills off (facts confirmed by 3 sessions, a proposer every 3 sessions)
- Install routes: Claude Code, Codex and Copilot CLI from a local clone added as a marketplace; Pi with `pi install git:github.com/microsoft/TokenEconomizer`; opencode by linking a TypeScript file. Supported versions are Claude Code 2.1.300 to 2.1.310, Codex 0.153.1 to 0.164.0, Copilot CLI 1.0.83 to 1.0.102, Pi 1.2.0 to 1.3.0
- What runs on the machine: A shell launcher starts a standard-library Python dispatcher on SessionStart, UserPromptSubmit, PostToolUse, PostToolUseFailure, Stop and SessionEnd. The judge runs as a detached `te judge` job so the hook returns at once. Tool pruning edits the agent's local settings file and adds it to .git/info/exclude
- Data leaving the machine: Only the model calls of the loop guard (on by default), the micro-skills proposer (off by default) and `toolprune measure` when run, sent through the person's own agent CLI as digests with paths and numbers masked. State lives under ~/.tokeneconomizer with 0700 and 0600 permissions
- Reported results: The paper reports 18.4 to 30.9 per cent lower mean cost on 277 SWE-Bench tasks from six repositories across five agent and model combinations, and 6.4 to 21.2 per cent on Web-Bench and two security-auditing benchmarks. These are the authors' figures; experiments/ holds the harness to rerun them
- Company: The repository is under Microsoft's GitHub organisation with Microsoft's SECURITY.md. The 11 authors are from UC Berkeley, Microsoft Research and Microsoft Security. The project page is hosted from a separate TokenEconomizer GitHub organisation and links back to the repository
- Category: Listed in code, the closest category, as superpowers is. Its capability is code.repo because it learns and injects facts about a repository; no category covers cost control for coding agents

- Scores: Reliability 46, Performance pending, Schema & documentation 66, Agent ergonomics 76, Security & auth 71, Payments & pricing 60, Task success pending, Maintenance & community 43, Transparency & trust 76 · total over the 7 assessed categories
- Why: Reliability, Local-package reading, as for superpowers and impeccable. · Schema & documentation, Framework reading, docs a model can follow, as superpowers was read. · Agent ergonomics, Framework reading, how much a coding agent has to carry. · Security & auth, Harness reading of the framework checklist, as superpowers and agent-zero were read. · Payments & pricing, Self-hosted rule. · Maintenance & community, No GitHub release found, and the releases page couldn't be read. · Transparency & trust, Apache-2.0, an OSI licence (30).
- Sources: 22, open questions: 9, both in the full twin
- Capabilities: code.repo
- JSON: https://www.anchorterminal.com/api/v1/tools/tokeneconomizer.json
- Verify (for the vendor): the badge `https://www.anchorterminal.com/badges/tokeneconomizer.svg` or a link to https://www.anchorterminal.com/tools/tokeneconomizer from a page on microsoft.com or tokeneconomizer.github.io or one of their subdomains, or the README of github.com/microsoft/TokenEconomizer, then `POST https://www.anchorterminal.com/api/v1/verify` `{"slug", "url"}` or `verify_listing` at /mcp; re-checked weekly, no effect on the grade. Snippets in the full twin.
- Support: https://github.com/microsoft/TokenEconomizer/issues; more in the full twin

## Before you call it

1. Check the agent's version against the README's supported range before installing; versions outside it are untested or unsupported.
2. Keep micro-skills off, or set microskills=envfacts, in a repository whose command output you don't trust.
3. If a tool you need is missing, run the `toolprune` command to see what was left out and `toolprune restore` to bring it back.
4. Run the plugin's commands from a terminal with ~/.tokeneconomizer/bin/te; inside the agent each command costs a model turn.
5. Start the agent with TE_DISABLE=1 to run one session without the plugin.

## Connect

```bash
git clone https://github.com/microsoft/TokenEconomizer.git && claude plugin marketplace add "$PWD/TokenEconomizer"
# Pi:
pi install git:github.com/microsoft/TokenEconomizer
```

```bash
claude plugin install tokeneconomizer@tokeneconomizer
```

## Similar tools

| Tool | Grade | Score | Shared capabilities | Slim |
| --- | --- | --- | --- | --- |
| GitHub MCP Server | BB | 70.4 | code.repo | https://www.anchorterminal.com/tools/github-mcp-server.min.md |
| Entire | B | 69.4 | code.repo | https://www.anchorterminal.com/tools/entire.min.md |
| Graphify | B | 68.9 | code.repo | https://www.anchorterminal.com/tools/graphify.min.md |
| Azure DevOps MCP Server | B | 66.4 | code.repo | https://www.anchorterminal.com/tools/azure-devops-mcp.min.md |
| Atlassian Rovo MCP Server | C | 57.9 | code.repo | https://www.anchorterminal.com/tools/atlassian-rovo-mcp.min.md |


## Panel reviews (0, desk reviews from public material, no calls made)

