[{"data":1,"prerenderedAt":4},["ShallowReactive",2],{"readme:tokeneconomizer":3},"\u003Ch1>TokenEconomizer: Experience-Driven Black-Box Cost Control for Coding Agents\u003C\u002Fh1>\n\u003Cp align=\"center\">\n  Aaron J. Li\u003Csup>1\u003C\u002Fsup>,\n  Weijia Xu\u003Csup>2\u003C\u002Fsup>,\n  Chandan Singh\u003Csup>2\u003C\u002Fsup>,\n  Zixiao Chen\u003Csup>3\u003C\u002Fsup>,\n  Jeevana Priya Inala\u003Csup>2\u003C\u002Fsup>,\n  Charlotte Siska\u003Csup>3\u003C\u002Fsup>,\n  \u003Cbr \u002F>\n  Acar Tamersoy\u003Csup>3\u003C\u002Fsup>,\n  Bin Yu\u003Csup>1\u003C\u002Fsup>,\n  Ion Stoica\u003Csup>1\u003C\u002Fsup>,\n  Michel Galley\u003Csup>2\u003C\u002Fsup>,\n  Jianfeng Gao\u003Csup>2\u003C\u002Fsup>\n\u003C\u002Fp>\n\u003Cp align=\"center\">\n  \u003Csup>1\u003C\u002Fsup>UC Berkeley   \u003Csup>2\u003C\u002Fsup>Microsoft Research   \u003Csup>3\u003C\u002Fsup>Microsoft Security\n\u003C\u002Fp>\u003Cp align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Farxiv.org\u002Fabs\u002F2610.22732\" rel=\"nofollow ugc noopener\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FarXiv-2610.22732-b31b1b.svg\" alt=\"arXiv\" \u002F>\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Ftokeneconomizer.github.io\" rel=\"nofollow ugc noopener\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fproject-page-2f6fb0.svg\" alt=\"Project page\" \u002F>\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fx.com\u002Faaron_jli\u002Fstatus\u002F2114797313613053952\" rel=\"nofollow ugc noopener\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FX-post-000000.svg?logo=x&amp;logoColor=white\" alt=\"X post\" \u002F>\u003C\u002Fa>\n  \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fpython-3.10%2B-3776ab.svg\" alt=\"Python 3.10+\" \u002F>\n  \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flicense-MIT-blue.svg\" alt=\"MIT license\" \u002F>\n\u003C\u002Fp>\u003Cp align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Ftrendshift.io\u002Frepositories\u002F315380\" rel=\"nofollow ugc noopener\">\u003Cimg src=\"https:\u002F\u002Ftrendshift.io\u002Fapi\u002Fbadge\u002Ftrendshift\u002Frepositories\u002F315380\u002Fdaily?language=Python\" alt=\"#1 Python repository of the day on Trendshift\" width=\"250\" height=\"55\" \u002F>\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Ftrendshift.io\u002Frepositories\u002F315380\" rel=\"nofollow ugc noopener\">\u003Cimg src=\"https:\u002F\u002Ftrendshift.io\u002Fapi\u002Fbadge\u002Ftrendshift\u002Frepositories\u002F315380\u002Fweekly?language=Python\" alt=\"#10 Python repository of the week on Trendshift\" width=\"250\" height=\"55\" \u002F>\u003C\u002Fa>\n\u003C\u002Fp>\u003Cp align=\"center\">\n  Our measurement on SWE-Bench tasks: \u003Cb>18.4–30.9% lower mean cost\u003C\u002Fb> across five agent–model\n  combinations, cheaper in \u003Cb>all 30\u003C\u002Fb> repository × combination cells, and Pass@1 up in\n  \u003Cb>4 of 5\u003C\u002Fb>. \u003Ca href=\"#results\" rel=\"nofollow ugc noopener\">Results\u003C\u002Fa>\n\u003C\u002Fp>\u003Cp align=\"center\">\n  \u003Cpicture>\n    \u003Csource media=\"(prefers-reduced-motion: reduce)\" srcset=\"docs\u002Fassets\u002Fteaser.png\">\u003C\u002Fsource>\n    \u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fmicrosoft\u002Ftokeneconomizer\u002FHEAD\u002Fdocs\u002Fassets\u002Fteaser.gif\" width=\"100%\" alt=\"An animation that opens on a title card: TokenEconomizer, experience-driven black-box cost control for coding agents, with its three mechanisms (micro-skills, tool pruning, failure-loop intervention), the agents it works with (Claude Code, Codex, GitHub Copilot CLI, Pi) and the UC Berkeley and Microsoft logos. Then a schematic of six sessions in one repository, each a bar of what it cost: the work itself plus three kinds of waste, namely re-learning the repo, tools never used, and getting stuck in loops. Each of the first three sessions teaches TokenEconomizer one thing, in order: 1 micro-skills remember how the repo works (run tests with python -m pytest), 2 tool pruning skips tools never used here (Read and Edit kept, Notebook and Browser left out), and 3 failure-loop intervention spots loops and steps in (the same error three times meets a nudge to try another way). In the session after each lesson that waste shrinks, so the bars step down below a dashed line marking the cost without TokenEconomizer. It ends on results measured on SWE-Bench tasks: 18.4–30.9% lower mean cost across five agent–model combinations, cheaper than default in 30 of 30 repository × combination cells, and Pass@1 up in 4 of 5; per combination, cost 23.6% lower and Pass@1 +1.3 for Claude Code with Sonnet 5, 30.9% and −1.0 with Opus 4.8, 24.7% and +0.9 for Codex with GPT-5.6 Terra, 26.1% and +1.6 with GPT-5.6 Sol, and 18.4% and +2.6 for Copilot CLI with Sonnet 5.\" \u002F>\n  \u003C\u002Fpicture>\n\u003C\u002Fp>\u003Cp>TokenEconomizer makes coding agents cheaper to run in the repositories you work in often,\nwithout changing the agent itself. It learns from the sessions an agent has already run in a\nrepository, and uses that experience to cut waste in the sessions that follow. It has three\nmechanisms:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\u003Cstrong>Micro-skills: remember how the repository works.\u003C\u002Fstrong> Sessions keep rediscovering the same\nfacts: a build step that must run first, the spel\u003C\u002Fli>\n\u003C\u002Ful>\n",1795114440452]