hn.today

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

gist.github.com390 points136 comments
Screenshot of Claude Code burns ~15–20% of your tokens on a 3-word status line

Claude Code periodically generates a short status description for each background agent by sending the agent’s full transcript to a model, typically Opus. The summary appears only in the agents panel; it is not used in the conversation. Telemetry measurements reported here found these calls accounted for 16.4% of estimated Claude Code spend and 19.7% of API requests, with 96% of the spend going to Opus. The author says the requests began running by default in version 2.1.232 and are largely invisible in ordinary session logs and documented token-usage guidance. These figures are Claude Code’s per-request cost estimates, not billing totals; for subscribers, the cost is reduced rate-limit capacity.

The proposed workaround is an approximately 80-line Bun preload script that recognizes the summary timer by inspecting timer-callback source text, then prevents that timer from running while leaving other timers and background-agent work intact. Testing on Linux across Claude Code versions 2.1.257-2.1.312 found that the hook stopped summary requests; the visible tradeoff is that agent-panel statuses no longer update. Installation requires setting BUN_OPTIONS for Claude Code processes and restarting the daemon so its child processes inherit the setting. The author stresses that updates can change the internal callback and silently make the hook ineffective, so users should verify it after each upgrade, ideally using OpenTelemetry. macOS and Windows are untested, and no built-in setting disables the summaries alone.

Read on gist.github.com136 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in AI

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.