[00:02]
agents wasting tokens. What if your AI coding agent has been paying for the same lesson over and over? Every session, it wakes up with no memory. It asks the same questions. It hits the same walls, and you burn tokens on every
[00:17]
Microsoft just measured how much of that is pure waste. Today, I'm breaking down Token Economizer. It's a brand new open source plugin from Microsoft Research, UC Berkeley, and Microsoft Security. I'll show you exactly where your agent's
[00:33]
tokens are leaking, the three tricks this plugin uses to plug those leaks, and whether you can install it today. And stick around because one result in their testing completely flips a shortcut a lot of people use to save
[00:45]
tokens. So here's the update. On November 16th, Microsoft Research Economizer. Here's the problem it tackles. Most coding agents start every session from scratch. Each time, the model gets sent the instructions, the
[01:00]
tool descriptions, and the history. All of that eats tokens. And because the agent doesn't remember your project, it keeps rediscovering stuff it already figured out. Token Economizer learns from your past sessions instead. After
[01:14]
each session, it reads the log, updates what it knows about your repository, and uses that to cut waste next time. A repository is just the folder where your project's code lives, and it doesn't change your agent or your model. It
[01:28]
works through what your agent already offers. First, the researchers had to find the leaks. They watched Claude code work through 60 tasks from SWE-bench, a test set of real bug fixes from open source Python projects. They ran the
[01:41]
tasks one after another in each repository, just like you'd use an agent on your own project. And they found three big leaks. Leak number one is rediscovered facts. Once a repository had at least five finished tasks, 30% of
[01:57]
the agent tool calls repeated an action it had already in an earlier task in that same repository. Only 7 % matched something from a different repository. So the agent wasn't relearning general coding, it was relearning your project.
[02:13]
Leak number two is unused tools. The agent got 23 tool descriptions on every single turn. 16 of them were never called, not once. That's text the model reads every turn for nothing. Leak number three is failure loops. The
[02:29]
Leak number three is failure loops. The 17 % of tasks that failed ate up 32 % of the total cost. So when an agent gets stuck, it doesn't just fail, it fails expensively. The team tested three popular open source plugins that try to
[02:43]
cut token use. Each one helped in some repositories, but not in others. So their takeaway is that saving tokens has to adapt to each project. That's exactly what token economizer is built for. It has three parts. Quick pause before I
[02:58]
show you how token economizer actually plugs those leaks. Inside the AI profit boardroom, we've got a 30-day AI coding agent roadmap that takes you step by step from setup to a working daily workflow, so you're never guessing what
[03:12]
to do next. And there are four coaching calls every week. So if you're setting up a coding agent or a plugin like this one and you get stuck on a setting or a command, you bring it to a call and get unstuck fast. It's a simple way to turn
[03:26]
use every day. Link in the description or go to aiprofitboardroom.com. All right, first micro skills. These are tiny one-line notes about your repository, stuff like the right build
[03:41]
order or the correct way to spell a command in your project. The plugin learns these from repeated failures and from a model that reviews your recent sessions. But here's the clever bit. It doesn't trust the facts straight away. A
[03:53]
note only gets added to the start of your agent sessions once three sessions confirm it. And if later sessions contradict it, the note gets dropped. So it's not stuffing random guesses into your context. It only keeps what keeps
[04:07]
proving true. One thing to note, in the GitHub version, micro skills is switched off by default. You turn it on with one config command. There's also a lighter mode that learns only from failures with no extra model calls at all. Second,
[04:22]
tool pruning. Remember those 16 tools that never got used? Tool pruning removes tools your agent probably won't need based on your repository's history. It does this through the agent's own settings. In the GitHub version, a tool
[04:36]
gets left out after it goes unused for 10 prompts across at least two sessions or across five sessions of any length. The core tools for running commands and editing files always stay. And if you need a removed tool back, one command
[04:50]
restores it. There's even a propose mode where it just suggests what to remove and lets you decide. Third, failure loop intervention. This one goes after those expensive stuck tasks. It watches for your agent hitting
[05:03]
the same failure again and again. Then a separate judge model decides whether the agent is truly stuck or slowly making progress because from the outside, those two can look the same. If the judge is at least 70% confident it's
[05:18]
stuck, the agent gets one short note nudging it to try a different approach. And if it's still stuck after that, the plugin doesn't kill the work. It alerts you and tells you how to step in so you stay in control. The whole system keeps
[05:32]
updating its decisions as new evidence comes in. And the savings Microsoft reports already include the tokens token economizer spends on its own model So the plugin's own overhead isn't hidden. They also found each of the
[05:45]
three parts saves on its own, but stacking all three gives the biggest Okay, so does it actually work? Here's what they tested. On Swell Bench, they what they tested. On Swell Bench, they ran 277 tasks across six repositories
[05:58]
using five different agent and model combinations. Every repository started with zero history, no head start. The average cost history, no head start. The average cost per task dropped by 18.4% to 30.9%
[06:12]
and costs were lower in all 30 repository and combination pairs. Not most of them, all 30. What about quality? They measured something called pass at one. That just means the agent solved the task on its very first try.
[06:27]
Pass at one went up in four of the five combinations and dipped in the other one. So overall, task success held steady while token use came down. Now here's that result I teased earlier. A lot of people try to save tokens by just
[06:41]
turning down the model's reasoning efforts. Microsoft tested that too. It saved a similar amount, sometimes more, but performance dropped a lot. So that shortcut saves tokens by making your agent worse. Token economizer saves
[06:56]
tokens by making your agent smarter about your project. There's one catch and I want to be straight with you. Your first few tasks can actually cost a bit learning. But in their Claude code tests, total cost dropped below the
[07:10]
normal default in every repository by the sixth task. So give it a little time And it's not just bug fixes. On Web Bench, which is a set of web development tasks done in order, costs came down 16.0%
[07:25]
to 21.2%. And on security auditing, where every task happened in a brand new repository, costs still came down 6.4% to 19.6%. That makes sense. Less history means less to learn from, so the savings are
[07:41]
smaller, but it still helped. So is it available now? Yes. The open source plugin is available right now on GitHub. The link is msft.it/6017xdtyc
[07:57]
It officially supports Claude code, Codex, GitHub Copilot, CLI, and Pi. It also has experimental support for Open Code, Cursor agent on Mac and Linux, and Hermes agent. To use it, you need one of those agents signed in the way you
[08:13]
normally sign in, and Python 3.10 or newer. You don't need a separate API key, and everything it learns stays on your own machine. Setup is pretty simple. You clone the repository, add it as a plugin marketplace in your agent,
[08:27]
and install the plugin. Then you run the status command to check it's working. If you're on Claude Code or Copilot CLI, there's also a one-time command to refresh the tool catalog on each machine. The README walks you through
[08:41]
every step for each agent. Out of the box, tool pruning and the failure loop guard are on. Micro skills is off, so if you want all three working, switch that one on. You can turn any of them on or off for one repository or for all of
[08:54]
them at once. So here's the bottom line. Coding agents have had a memory problem. Every session starts cold. Token economizer shows that just by learning from your own past sessions, an agent can stop rediscovering the same facts,
[09:09]
stop reading tool descriptions it never uses, and stop spinning in circles when it's stuck. No new model, no changes to the agent, just experience. Microsoft calls it a path toward coding agents that learn not just how to solve
[09:23]
tasks, but how to spend their computing power well. And if you use the same agent on the same project every day, this is exactly the kind of tool that gets better the more you use it. There's a window right now where most business
[09:37]
owners haven't figured this out yet, and that window won't stay open forever. If you want to get ahead on learning AI coding agents and tools like this one, the AI Profit Boardroom is where we learn it together. You get daily
[09:49]
tutorials so you keep learning new tools as they drop. You get four coaching calls every week to ask questions live. You get a prompt library so you never start from a blank page, and you get the member map so you can see who else is in
[10:02]
the community and connect. Link in the description or go to aiprofitboardroom.com. If you want the full process, the SOPs and over 100 AI use cases like this one, join the AI success lab. It's our free
[10:16]
community. Links in the comments and description. You'll get all the video notes from this episode plus access to 95,300 members. It's completely free. The video notes break down everything from today,
[10:29]
from where agents waste tokens to token economizers three features so you don't have to rewatch. And it's a place to keep learning with people building with AI every day. So jump in, grab the notes, and I'll see you inside.