Flamerix AI's Bun preload disables Claude Code's undocumented agent_summary query, found burning 15-20% of tokens in background-agent sessions.
On 29 October 2026, the independent research group Flamerix AI published a Bun preload script that disables an undocumented background query inside Claude Code called agent_summary. Flamerix found the query, via Claude Code's own OpenTelemetry export, costing more of a session's estimated spend than the main conversation itself. The Hacker News thread about the finding reached 563 points and 228 comments within a day.
agent_summary is a background query Claude Code has sent every 30 seconds per active background agent since version 2.1.232 (13 August 2026), asking that agent's own model to describe its last action in three to five words for the status line. Flamerix AI measured it consuming 16.4% of all Claude Code token spend in a one week sample, before a fix brought that to zero.
Update, 9 November 2026: Anthropic has since responded and shipped a fix. A Claude Code team member said on Hacker News on 29 October that, across users who send telemetry, agent_summary was "about 2% of cost at API list prices" and, in the terminal, "about 6% of cost". On 4 November Anthropic said that Haiku 5.5 now writes the status line from short notes instead of re-reading the agent's whole conversation, so "each update costs about 99% less", in Claude Code v2.1.316 and later. Claude Code 2.1.318 also has an off switch, CLAUDE_CODE_DISABLE_AGENT_PROGRESS_SUMMARIES=1, which users found in the binary; it is not in the changelog or the environment variable docs.
Flamerix AI's fix cut agent_summary requests to zero within two days of installing it, after measuring what the query had been costing:
agent_summary accounted for 16.4% of Claude Code's estimated spend (the main conversation itself ran 15.7%) and 19.7% of all API requests, about one in five. Flamerix AI says 96% of that spend ran on Opus, at roughly 9,000 input tokens for every output token.no-agent-summary.js, is a roughly 70 line Bun --preload script. It does not modify the Claude Code binary. It wraps the global setTimeout function and refuses to arm the specific timer that fires the summary request, which it recognizes by matching text inside that timer's callback.skipTranscript: true, so they never appear in Claude Code's own session logs on disk. Only an OpenTelemetry export shows them; a second GitHub issue, #104358, tracks that gap in cost visibility.Agent builders pay for agent_summary in proportion to how many background agents are running and for how long, not to the work those agents do. Before the 4 November fix, a session with three concurrent long-running subagents paid six of these calls every minute, each resending that agent's full transcript. On a metered API key that is direct spend; on a Claude subscription plan it eats the rate-limit headroom a developer would otherwise use for real agent turns. Because the calls skip the transcript, a team's own cost dashboards understate real usage by this amount unless they read the OpenTelemetry export directly.
Whether Anthropic documents an official way to turn agent_summary off is the open question. Claude Code 2.1.318 has CLAUDE_CODE_DISABLE_AGENT_PROGRESS_SUMMARIES=1, which Flamerix AI found in the binary and another user confirmed works; Flamerix AI says it is absent in 2.1.317 and earlier, and it is not in the changelog or the environment variable docs, though an Anthropic employee pointed to it when closing issue #86879 on 9 November 2026. On older versions the fix is still the unofficial script. Flamerix AI is explicit that its tool is independent and not affiliated with Anthropic, and the fix depends on matching a specific string inside a compiled callback, which an unrelated Claude Code update can silently break; Flamerix AI's own changelog shows the matching logic already changed twice since the gist was first published. Anthropic's 4 November update made each summary about 99% cheaper but does not turn the query off. A Hacker News commenter also asked whether the same query runs when Claude Code is driven through the Claude Agent SDK or ACP rather than the interactive CLI; that remains unanswered.
agent_summary at 16.4% of all Claude Code token spend and 19.7% of all API requests in a one week sample, before its fix brought that to 0%. Anthropic says that across users who send telemetry it was about 2% of cost at API list prices, and about 6% in the terminal.CLAUDE_CODE_DISABLE_AGENT_PROGRESS_SUMMARIES=1, found in the binary by users; on 2.1.317 and earlier the only fix is an independent, unofficial Bun preload script.It is a background request Claude Code sends roughly every 30 seconds for each running background agent, asking that agent's model to describe its last action in three to five words. The text only updates the status line in the agents panel; it never reaches the main conversation or the agent's own context. Since Anthropic's 4 November 2026 update (v2.1.316 and later), Haiku 5.5 writes that line from short notes instead of the agent's whole conversation.
Measurements vary by session shape. Flamerix AI recorded 16.4% of total Claude Code spend and 19.7% of API requests over a one week sample in October 2026; GitHub issue #86879, filed in August 2026, recorded 22.7% of requests and 18% of weighted cost in a single 4 hour, 27-subagent session. Anthropic says that across users who send telemetry it was about 2% of cost at API list prices and about 6% in the terminal, and that its 4 November update makes each summary about 99% cheaper.
On Claude Code 2.1.318 or later, setting CLAUDE_CODE_DISABLE_AGENT_PROGRESS_SUMMARIES=1 turns the summaries off. Users found it in the binary and it is not in the changelog or the environment variable docs, so treat it as undocumented; Flamerix AI says to set it to exactly 1. On 2.1.317 and earlier, Flamerix AI's no-agent-summary.js is an independent, MIT-licensed Bun preload script that disables the query without modifying the Claude Code binary. It is unaffiliated with Anthropic and can silently stop working after a Claude Code update, so Flamerix AI recommends re-verifying it after every upgrade.
Source: Flamerix AI Discussion: Hacker News
Developers comparing Claude Code against other coding agents and their background-task behavior can browse the current options in the agent directory on AI Agents Listing.
One email a week. New agents, MCP servers and skills, and what is actually getting traction.
ClawDOS is an open source AI coding agent harness running Claude's Messages API on a real 1980s IBM PC, posted to Hacker News on 21 November 2026.
Turbo-browser-mcp is a new open-source Playwright MCP server with 11 tools that batches browser actions to cut token use and model turns for AI agents.
A Windows 11 component called MissionControlAggregator checks for Claude Code, Codex, Cursor and other coding agents, researcher Xusheng Li found on 16 November 2026.