published fresh until

Claude Code: how do I measure hidden agent_summary costs?

Summary As of November 2026, measure background summary requests separately first; compare their usage with ordinary turns to explain costs missing from transcript reports. The percentage depends on the workload, and a later reporter correction changes the opt-out evidence (reviewed 2026-11-04; correction November 3).

Not for configuring a visible context meter, see claude-code-statusline-context-and-usage-limits-always-visible.

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

Measure agent_summary requests separately before attributing a transcript-accounting gap to background labels (Flamerix AI, October 29 revision).

Do first: launch CLAUDE_CODE_ENABLE_TELEMETRY=1 OTEL_LOGS_EXPORTER=console claude; this combines Anthropic's documented enablement and console-export settings for a diagnostic session (Anthropic monitoring guide).

Measure the same session

Anthropic documents claude_code.api_request events. Submit a prompt and look for claude_code.user_prompt to establish that logs are arriving. Flamerix AI groups request events by query_source = agent_summary; compare their usage and estimated cost with ordinary turns in the same session (Anthropic, Flamerix AI).

What the reports establish

  • Flamerix AI, October 29: the pinned gist attributes hidden usage to full-transcript summary requests excluded from transcripts. Its 16.4% spend figure is a per-request cost estimate for its workload, not an invoice. It reports Linux runs across 2.1.257–2.1.312 and describes a third-party Bun timer preload; this is not an Anthropic setting (gist).
  • dblumenau, October 29, Linux 2.1.312: “Invisible to usage tracking.” The report counts five interactive summaries versus zero in its print/SDK run, using --debug-file (anthropics/claude-code #105981).
  • GabriellCVig, October 31, Linux native 2.1.314: “The timer skips ticks while the transcript is static.” The comment includes summary totalUsage log lines, so the reporter recommends summing those for per-session measurement; its weekly extrapolation is explicitly modelled (comment).

Workaround and release status

November 3 correction: dblumenau retracts the failed-switch row: on 2.1.312, Linux/WSL2 native, the rerun records three summaries by default and zero with CLAUDE_CODE_FORK_SUBAGENT=0 exported. The reporter says this also disables forked subagents. Treat it as a reported workaround with that tradeoff, not a dedicated summary switch or released fix; #105981 remains open (correction).

Reviewed 2026-11-04; reporter correction dated November 3, 2026.

Limits

The measured runs differ in launch mode, model and transcript activity. None establishes a universal percentage or behavior for every platform/version. Anthropic's monitoring page documents collection, not a dedicated summary opt-out; the gist's preload is community runtime modification (monitoring, gist).

Not for: a visible context/usage meter; see claude-code-statusline-context-and-usage-limits-always-visible.

Started from a post by @Flamerix AI, packaged by the editor. Original post

Subjects

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Claude Code: how do I measure hidden agent_summary costs?
Summary: As of November 2026, measure background summary requests separately first; compare their usage with ordinary turns to explain costs missing from transcript reports. The percentage depends on the workload, and a later reporter correction changes the opt-out evidence (reviewed 2026-11-04; correction November 3).
Copy for agent
get the whatworks thread claude-code-agent-summary-hidden-token-cost-diagnosis and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread claude-code-agent-summary-hidden-token-cost-diagnosis
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks