TokenEconomizer learns from earlier coding sessions
Project experience informs the plugin’s later coding sessions.
The TokenEconomizer repository describes a plugin for developers returning to the same codebase with an AI coding agent. It learns from earlier sessions without modifying the agent’s model or code. Tool pruning, which excludes unused capabilities from later sessions, differs by host: individual tools in Claude Code, capability packages in Codex, and whole MCP servers in GitHub Copilot CLI. Pi has no tool pruning; opencode has none yet, and its plugin support remains experimental.
The usage guide requires a supported, signed-in agent and Python 3.10 or newer. Learning project facts, called micro-skills, is optional and disabled initially. Tool pruning makes no model calls. The loop guard’s model calls, and the fact proposer when enabled, use the agent’s account and are billed there; with Copilot’s own-provider setup, however, those calls cannot reach the configured provider. The status command reports session costs and this additional model overhead after sessions end.
The design document separates the installed plugin from research experiments. The plugin redirects an ongoing turn and records a notice if it remains stuck; it never stops the turn itself. Under codex exec, no hook notice is displayed: te status counts it afterwards. Live checks used deliberately provoked loops; benefit in real failure loops is not established. Learning also has limits: a turn without recognized verification can count as having ended well, and tests launched through scripts are not recognized as verification.
Asif Razzaq’s October 30 coverage links the research paper, repository and project page as sources.

