Close Menu
NCIJ Network NCIJ Network
    What's Hot

    The Guardian view on Labour’s fiscal devolution: the future of Burnhamism will play out in municipal England | Editorial

    October 30, 2026

    AI Security Agents Compared: Claude, Codex, Mantis, Cloudflare

    October 30, 2026

    Chinese Hackers Use AI-Powered ARTEX to Target Over 200 Organizations Worldwide

    October 30, 2026
    Facebook X (Twitter) Instagram
    Trending
    • The Guardian view on Labour’s fiscal devolution: the future of Burnhamism will play out in municipal England | Editorial
    • AI Security Agents Compared: Claude, Codex, Mantis, Cloudflare
    • Chinese Hackers Use AI-Powered ARTEX to Target Over 200 Organizations Worldwide
    • Given a chance, women-led microenterprises uplift Nepali communities & conservation
    • Five Takeaways From ProPublica’s Midterm Election Coverage — ProPublica
    • Why Trump’s Russia Diesel Deal Failed to Lower Prices
    • UN envoy pushes for renewed Cyprus talks before end of 2026
    • Treasury accepts role in staff member’s death after inquest
    • About
      • Our Team
      • Editorial Policy
      • Editorial Independence
      • International Support
    • Trust & Standards
      • AI Usage Policy
      • Conflict of Interest Policy
      • Corrections Policy
      • Ethics Policy
      • Fact-Checking Policy
      • Source Protection
    • Get Involved
      • Guide for Sources
      • Support Independent Journalism
    • Legal
      • Cookie Policy
      • Privacy Policy
      • Terms of Use
    Facebook X (Twitter) Instagram
    NCIJ Network NCIJ Network
    Friday, October 30
    • Home
    • World
    • Ai
    • Business
    • Politics
    • Health
    • Crypto
    • Science
    • Technology
    • Cybersecurity
    • Defense & Security
    • Economy
    • Energy
    • Europe
    • More
      • Fact Check
      • Investigations
      • Opinion & Analysis
      • Environment
    NCIJ Network NCIJ Network
    Home»Artificial Intelligence

    Meet TokenEconomizer: Microsoft’s Plugin That Cuts Coding Agent Costs by Up to 30.9%

    NCIJ NETWNCIJ NETWORKBy NCIJ NETWNCIJ NETWORKOctober 30, 2026 Artificial Intelligence No Comments4 Mins Read
    Share
    Facebook Twitter LinkedIn Pinterest Email

    A team of researchers from Microsoft Research and UC Berkeley have released TokenEconomizer, an open-source cost controller for coding agents. TokenEconomizer is a plugin that learns from past sessions in a repository to cut waste in later ones. It works with Claude Code, Codex, GitHub Copilot CLI and Pi. It does not touch model weights or agent code. On 277 SWE-Bench tasks, it lowered mean cost by 18.4% to 30.9% across 5 agent-model settings.

    TL;DR

    • Package: A standard-library Python package and agent plugins, with 3 switchable mechanisms.
    • Runs on: Any machine running Claude Code, Codex, Copilot CLI or Pi with Python 3.10+. No GPU and no API key of its own.
    • Performance: 18.4% to 30.9% lower mean SWE-Bench cost, and cheaper in all 30 repository-setting cells.
    • Best: 30.9% lower cost on Claude Code with Opus 4.8 (33.2% when combined with RTK).
    • Worst: Only 6.4% to 9.3% savings on ReposVul audits; Pass@1 drops 1.0 point on Opus 4.8.

    Why do coding agents waste tokens?

    Every agent turn re-bills the system prompt, every loaded tool schema and the full history. The research team profiled 60 SWE-Bench tasks across 6 repositories using Claude Code with Opus 4.8. They found 3 recurring sources of waste:

    • Repeated discovery: once 5 tasks precede the current one, 30% of tool calls repeat an earlier action.
    • Unused tools: 23 tool schemas load every turn. 16 are never called, and 3 cover 98% of calls.
    • Failure loops: 10 failed runs were 17% of tasks but 32% of total spend.

    They also tested 3 fixed open-source strategies: RTK, Serena and Aider’s RepoMap. None was cheaper everywhere. All 3 cut cost on Django and raised it on SymPy.

    How does TokenEconomizer work?

    TokenEconomizer is an external controller that treats the agent as a black box. It keeps a state per repository, built from completed traces. Before each task, it sets 3 policies through the prompt, the tool settings and the event stream.

    1. Micro-skills

    An LLM proposer turns trace digests into 1-line facts, such as the working test command. Each fact carries regex detectors that check later traces without a model call. A fact enters the prompt after 3 confirmations on tasks with non-overlapping edited files. Its need rate must also stay at or above 0.4. One contradiction counts as 5 confirmations, so wrong facts retire quickly.

    2. Tool pruning

    Shell, read, write and edit tools are always kept. Other tools are masked after 3 consecutive unused tasks, or when an LLM judge marks them irrelevant. The full catalog returns every 5 tasks for a re-audit. On Django with Claude Code, the first request on task 2 fell from 43,351 to 16,295 prompt tokens.

    3. Failure-loop intervention

    The controller learns a turn budget: 1.25 times the 90th percentile of successful run lengths. Cheap rule checks flag repeated failures or dense errors. An LLM judge then decides if the agent is stuck, at 0.7 confidence or higher. A stuck agent gets 1 redirect, then a stop if the loop recurs.

    agent Coding costs cuts Meet Microsofts Plugin TokenEconomizer
    NCIJ NETWNCIJ NETWORK
    • Website

    Keep Reading

    AI Security Agents Compared: Claude, Codex, Mantis, Cloudflare

    Winter fuel cuts turned the Welsh against Labour, Neil Kinnock says

    Healey’s budget cuts mean Britain is likely to miss green heating targets | Renewable energy

    Samaya AI Releases Sterling: A 3B-Active Finance Research Agent Model that Beats Claude Fable 5.1 on FrontierFinance at 11x Lower Cost

    Edge0 Releases Audio8-TTS-Realistic, a 0.6B Voice Cloning TTS Model

    Cisco Open Sources Quarry to Catch AI Agent Attacks Hidden in Harmless Steps

    Add A Comment
    Leave A Reply Cancel Reply

    Editors Picks

    The Guardian view on Labour’s fiscal devolution: the future of Burnhamism will play out in municipal England | Editorial

    October 30, 2026

    AI Security Agents Compared: Claude, Codex, Mantis, Cloudflare

    October 30, 2026

    Chinese Hackers Use AI-Powered ARTEX to Target Over 200 Organizations Worldwide

    October 30, 2026

    Given a chance, women-led microenterprises uplift Nepali communities & conservation

    October 30, 2026
    Latest Posts

    The ‘long bitcoin, short the bankers’ era is officially over as TradFi giants embrace digital assets

    August 16, 2026

    Google Pixel 11 Pro vs. Apple iPhone 17 Pro: How the new Pixel competes with its biggest rival

    August 16, 2026

    UK-made drones strike targets inside Russia

    August 16, 2026

    Subscribe to News

    Get the latest sports news from NewsSite about world, sports and politics.

    NCIJ Network is an independent digital news platform delivering trusted investigative journalism, European and global news, in-depth analysis, and fact-based reporting with accuracy, transparency, and integrity.

    Facebook X (Twitter) Instagram Pinterest YouTube

    The Guardian view on Labour’s fiscal devolution: the future of Burnhamism will play out in municipal England | Editorial

    October 30, 2026

    AI Security Agents Compared: Claude, Codex, Mantis, Cloudflare

    October 30, 2026

    Chinese Hackers Use AI-Powered ARTEX to Target Over 200 Organizations Worldwide

    October 30, 2026

    Subscribe to Updates

    Get the latest creative news from FooBar about art, design and business.

    Type above and press Enter to search. Press Esc to cancel.