Claude Code's Hidden Token Drain: 20% of Spend on Status Summaries
Claude Code's Hidden Token Drain: The 3-Word Status Line Costing Developers 20% of Their AI Budget
In the world of AI-assisted development, every token counts. That's why a recent discovery by Flamerix AI has sent ripples through the developer community: Claude Code, Anthropic's powerful coding agent, is silently burning up to 20% of its token budget on a seemingly innocuous feature—the 3-word status updates that appear in the background agents panel.
This isn't a minor inefficiency. According to detailed telemetry data, the `agent_summary` system now outpaces even the main conversation in cost, consuming more API requests than the core interactions developers actually see. For teams running heavy automation or multiple background agents, this represents a significant, invisible drain on both subscription rate limits and API spend.
The Problem: A Timer That Costs a Fortune
Every 30 seconds, for every background agent, Claude Code sends that agent's entire transcript to its own model—typically the premium Opus—with a single instruction: "describe your most recent action in 3-5 words." The result is a tiny status line in the agents panel, which never reaches the user or the main conversation. It's purely cosmetic.
The anomaly was first detected through OpenTelemetry exports, where grouping API requests by `query_source` showed `agent_summary` costing more than the main conversation itself. The data is stark:
- 16.4% of all Claude Code spend attributed to agent summaries (vs. 15.7% for main conversations)
- 19.7% of all API requests—roughly 1 in 5
- A staggering 9,000:1 ratio of input tokens to output tokens, meaning the model reads a massive transcript to produce almost nothing
Since version 2.1.232 (August 2026), this feature has been enabled by default with no official setting to disable it. The documented SDK option `agentProgressSummaries` is a red herring—it defaults to `false` but is overridden by an OR expression in the code, with every path setting it to `true`.
The Fix: A Bun Preload Hook
Flamerix AI has released an unofficial but effective fix: a Bun preload script that intercepts the timer responsible for triggering these expensive summary requests. The ~80-line script works by wrapping `setTimeout` and `setInterval` functions.
When a callback's source text contains the summarizer's anchor string—the `[AgentSummary] Timer fired` log line—the hook returns an inert timer handle instead of arming the real one. Every other timer passes through untouched, ensuring no collateral damage to normal operations.
The choice of a timer hook over simpler methods is deliberate. The summarizer module ships as precompiled Bun bytecode, making direct code modification impossible. However, `Function.prototype.toString` still returns a callback's source even from bytecode, providing the necessary hook point.
How to Implement the Fix
For developers looking to reclaim their token budget, the implementation is straightforward:
- Download the `no-agent-summary.js` script to a stable location
- Set the `BUN_OPTIONS` environment variable globally to include `--preload /absolute/path/no-agent-summary.js`
- Restart the Claude Code daemon with `claude daemon stop --any`
The script supports several configuration options via environment variables. `CC_AGENT_SUMMARY_MODE` defaults to `off` but can be set to `pass` for A/B testing. `CC_AGENT_SUMMARY_LOG` enables logging, and `CC_AGENT_SUMMARY_MARKER` writes a marker file on load for verification.
Why There's No Official Setting
Anthropic's design choices make the absence of a kill-switch particularly frustrating. The company has implemented several layers of obfuscation:
- The documented switch only turns it on—the SDK option is effectively a no-op for disabling
- The interval is server-controlled, clamped to 30-240 seconds with no value that disables the timer
- Obvious environment variables don't work—`DISABLE_NON_ESSENTIAL_MODEL_CALLS` doesn't exist in the binary, while `CLAUDE_CODE_FORK_SUBAGENT=0` kills the feature only by disabling fork subagents entirely
- Prompt caching makes it cheaper, not cheap—98% of calls read from cache, but the 2% cold-cache hits carry a third of the cost
- Cost tools miss it—these requests aren't written to session logs, appearing only in OpenTelemetry exports
Interestingly, version 2.1.310 ships a cheaper `short` mode (about 2k tokens of notes instead of the full transcript), but it's switched off by default and only server flags can enable it.
The Bigger Picture: AI Coding Agent Efficiency
This discovery comes amid growing scrutiny of AI coding tool efficiency. A recent study found that a coding agent's harness can triple its cost without improving accuracy. The research showed Claude Code sending 16,581 tokens of fixed context in system prompts and tool schemas on the first API call, compared to 7,025 for OpenCode and just 829 for mini-SWE-agent.
Because agents re-send conversation transcripts on every turn, that initial overhead multiplies across steps. The agent_summary issue compounds this by adding another layer of redundant calls that serve no functional purpose.
Security Implications and the Road Ahead
The token waste also has security implications. Symantec's Threat Hunter Team recently identified unauthorized relay services repurposing Claude Code and OpenAI Codex, often rewriting configurations to disable sandboxing entirely. While not directly related, the complexity of Claude Code's runtime behavior makes such manipulation harder to detect.
For now, the community fix works well. Flamerix AI reports zero `agent_summary` requests since implementing the hook, with no other side queries growing to replace it. The visible change is limited to the per-agent panel status ceasing to update—a small price for reclaiming 15-20% of your AI coding budget.
Bottom Line
Claude Code's hidden token drain is a cautionary tale about the opacity of AI tooling costs. While the Bun preload script offers an effective workaround, the underlying issue remains: developers deserve transparency about what their AI tools are doing with their tokens. Until Anthropic provides an official off-switch, the community fix is the best defense against this silent budget killer.
As tested on Linux with Claude Code versions 2.1.257 through 2.1.312, the fix is reliable but should be re-verified after each update, as Anthropic may change the anchor strings or timer implementation at any time.
Related News

First Humanist Wins Religious Exemption from AI in Kentucky

Tailscale SSH Flaws Expose Privilege Escalation Risks, Patches Imminent

Brooks's Law in the AI Era: Why More Agents Means Faster Failure

Cloudflare Fixes GLM-5.3 KV Cache Leak Exposing 155 Responses

Anthropic Files S-1 for IPO, Eyes Nasdaq Listing Under 'ANT'

