token-optimizer vs TokenEconomizer
Context-waste hunter for coding agents: hooks compress reads, bash and search output, checkpoint before compaction, and audit waste in configs, skills, MCP and memory — with a local dashboard. — versus — Microsoft Research plugin that cuts coding-agent cost 18-31% on SWE-Bench by learning repo facts from past sessions, pruning unused tools and redirecting stuck failure loops — no agent changes.
Both are hook-based plugins attacking coding-agent token waste; token-optimizer compresses reads and output, TokenEconomizer learns per-repo facts, prunes tools and breaks failure loops.
| token-optimizer | TokenEconomizer | |
|---|---|---|
| Stars | 3.0k | 7.8k |
| Forks | 239 | 530 |
| Language | Python | Python |
| License | PolyForm-Noncommercial-1.0.0 | MIT |
| Last activity | 3 days ago | today |
| Topics | coding, skills | coding |
| Curated connections | 11 | 4 |
token-optimizer — the curator's take
The one token tool that argues with the others in its own README, and mostly wins the argument. Compressors like Headroom and RTK cover command output — roughly 15-25% of your context. Token Optimizer covers eight surfaces (bash, grep, tabular, file-re-read diffs, structure skeletons, archived large results, model verbosity, structural context) and then keeps going: checkpoints before auto-compact so savings survive it, model-routing nudges, loop detection, 30-day trend coaching, and per-component audits of CLAUDE.md, skills and MCP. It is cache-safe, injects nothing into your context, and measures before/after. The costs are real too: it is a large Python/TypeScript surface with 92 env knobs and 15 SQLite tables doing hook surgery on every Read and Bash, its headline dollar figures are counterfactual models against the author's own frozen baseline, and the licence is PolyForm Noncommercial 1.0.0 — commercial use needs a paid licence unless your org is under 5 people AND under US$20k/month revenue. Pick RTK if you want one boring binary; pick this if you want the whole waste budget attacked and instrumented.
TokenEconomizer — the curator's take
Install it on repos where you run agents daily: it learns the build quirks the agent keeps rediscovering, drops tool definitions you never use, and nudges turns stuck in a failure loop — measured gains, fails open. Payoff needs repeated sessions in the same repo, so it does little for one-off tasks; and its fact-proposer and judge spend some of your own plan's tokens to save more.