Microsoft's open-source TokenEconomizer plugin cuts Claude Code and Codex costs by learning from past sessions
The Apache-2.0 plugin from Microsoft Research and UC Berkeley works with Claude Code, Codex, Copilot CLI and Pi: it prunes tools a repo never uses, redirects turns stuck in failure loops, and can optionally inject learned repo facts, cutting mean SWE-Bench cost 18.4–30.9% in the paper's runs. It needs Python 3.10+ and no API key of its own, and everything it learns stays in ~/.tokeneconomizer (MarkTechPost).
