HN
Today

Claude Code burns ~15–20% of your tokens on a 3-word status line

Anthropic's Claude Code was silently burning 15-20% of users' tokens on a three-word status line, a costly quirk discovered via OpenTelemetry. A clever Bun preload now disables this unnecessary expense, highlighting the hidden costs of AI tools and inspiring creative technical solutions.

91
Score
10
Comments
#3
Highest Rank
5h
on Front Page
First Seen
Oct 29, 4:00 AM
Last Seen
Oct 29, 8:00 AM
Rank Over Time
453611

The Lowdown

A surprising revelation has emerged for users of Anthropic's Claude Code: a seemingly innocuous, three-word status line was consuming a significant portion of their AI model tokens. This background process, designed to summarize agent activity every 30 seconds, was discovered to be an efficiency sink, leading to a community-driven technical workaround.

  • The Problem: Claude Code was found to be spending 15-20% of total tokens (and nearly 20% of API requests) on generating a brief status summary for background agents, even though this information never directly reached the main conversation model or the user's view.
  • Detection: The anomaly was identified by Flamerix AI's DRIM system, which analyzed OpenTelemetry exports, showing agent_summary requests costing more than the main conversation itself.
  • Lack of Official Solution: Despite the significant token consumption, no built-in setting or environmental variable existed to disable this specific feature without also crippling other useful background agent functionalities.
  • The Fix: A Bun preload script, no-agent-summary.js, was developed. This script cleverly intercepts setTimeout/setInterval calls, identifies the specific timer responsible for the agent summaries by its source text, and prevents it from executing.
  • Implementation Details: The fix works by providing an inert handle instead of arming the timer, relying on Function.prototype.toString to identify the correct callback within the precompiled Bun bytecode.
  • Impact: When applied, the preload successfully eliminates agent_summary requests, with the only visible change being that the per-agent status panel no longer updates. Background agents and other functionalities remain intact.
  • Verification: Users are advised to verify the fix after every Claude Code update, as it relies on implementation details that could change.

This incident highlights the importance of observability in AI development and offers a compelling example of community ingenuity in optimizing complex systems that lack transparent cost controls.

The Gossip

Token Tally Troubles

Commenters expressed surprise and concern over the substantial token expenditure on a seemingly trivial feature. The discussion revolved around whether cached transcripts should make the calls cheaper, with some sharing personal observations of reduced token usage after implementing a fix or noticing changes in their billing. The general sentiment is that such hidden costs are problematic.

Product Probing & Peripherals

Users sought clarification on the scope of the issue, questioning whether the token-burning summary calls affect different Claude Code configurations or related products. Inquiries included if disabling the agent view (`disableAgentView`) or using Claude Desktop would mitigate the problem, indicating a desire to understand the vulnerability's breadth and find simpler workarounds.

Suspect Summary Spending

A vein of skepticism ran through the comments, with some users speculating about Anthropic's intentions behind this token-intensive feature. Terms like 'free-revenue feature-bug' and 'A/B test' were used, suggesting a belief that the design might be intentionally predatory or at least indicative of bloat and poor design choices, contrasting Claude with more minimalist alternatives.