LIVE FEED
ATLAS OWASP MEDIUM Moderate risk · Monitor closely RELEVANCE ▲ 6.2

Claude Code Agent Transcripts Leaked via Silent Token Drain

TL;DR MEDIUM
  • What happened: Claude Code silently sends full agent transcripts to Anthropic's API every 30 seconds for a UI-only status label.
  • Who's at risk: Claude Code users running multi-agent workflows are most exposed, losing token budget and exposing conversation history without consent or configuration option.
  • Act now: Audit Claude Code OpenTelemetry exports for agent_summary query_source events to confirm exposure · Apply the community Bun preload (no-agent-summary.js) to suppress agent_summary API calls · Monitor for Claude Code updates that may silently re-enable agent_summary after the fix
Claude Code Agent Transcripts Leaked via Silent Token Drain

Overview

A community analysis of Claude Code’s OpenTelemetry telemetry has revealed that the tool silently transmits the full transcript of every background agent to Anthropic’s model API approximately every 30 seconds. The sole purpose of these calls is to generate a 3–5 word status line displayed in the agents panel UI. The behaviour, enabled by default since version 2.1.232 (August 2026), has no user-facing toggle and was not publicly documented. Independent measurements confirmed the feature consumed 16–20% of total Claude Code API spend, with 96% of that routed to Opus — the most expensive model tier.

Technical Analysis

The agent_summary feature operates via a setTimeout/setInterval loop inside Claude Code’s bundled Bun runtime. Every ~30 seconds per active background agent, it constructs a request containing that agent’s entire conversation transcript and submits it to the configured model (defaulting to Opus) with the instruction to summarise the most recent action in 3–5 words. The response is used exclusively to update a UI label and is never injected back into any agent or user-facing conversation.

Key telemetry indicators:

  • query_source = agent_summary in Claude Code’s OpenTelemetry claude_code.api_request events
  • Input-to-output token ratio of approximately 9,000:1 (full transcript in, 3 words out)
  • Calls account for ~1 in 5 total API requests during active multi-agent sessions

The community fix (no-agent-summary.js) is a Bun preload that monkey-patches setTimeout and setInterval. When a callback’s source text matches the [AgentSummary] Timer fired anchor string, the preload returns an inert handle rather than registering the timer. All other timers pass through unmodified.

curl -fsSL https://gist.githubusercontent.com/flamerix-ai/c3905705cc4205e5de3011fa2e74efce/raw/no-agent-summary.js \
  -o ~/.local/share/no-agent-summary.js
BUN_OPTIONS="${BUN_OPTIONS:+$BUN_OPTIONS} --preload $HOME/.local/share/no-agent-summary.js" claude

Framework Mapping

  • AML.T0057 (LLM Data Leakage): Full agent transcripts — potentially containing credentials, source code, or sensitive task context — are transmitted to the API without explicit user awareness.
  • AML.T0084 (Discover AI Agent Configuration): The behaviour exposes agent state and conversation history to the model provider infrastructure on a polling basis.
  • LLM06 (Sensitive Information Disclosure): Transcript contents submitted for summarisation may include sensitive data processed by the agent during its task.
  • LLM04 (Model Denial of Service): The feature effectively consumes a disproportionate share of rate-limit headroom, degrading the primary conversation’s available token budget.

Impact Assessment

Users operating Claude Code in subscription mode lose rate-limit headroom rather than incurring direct invoice charges, but the effect is equivalent to a ~20% reduction in usable capacity. For enterprise teams running multi-agent pipelines, agent transcripts may contain proprietary code, internal system details, or credentials that are now being routinely transmitted in summarisation requests. The absence of any opt-out mechanism compounds the concern.

Mitigation & Recommendations

  1. Audit telemetry: Inspect Claude Code’s OpenTelemetry export and filter claude_code.api_request events by query_source to quantify agent_summary exposure in your environment.
  2. Apply the preload fix: Use the community no-agent-summary.js Bun preload to suppress the timer without modifying the Claude Code binary.
  3. Monitor for regressions: The fix author notes that Claude Code updates can silently re-enable the behaviour; implement a post-update verification step.
  4. Restrict agent context: Until Anthropic provides an official toggle, limit sensitive data passed to background agents to reduce transcript leakage risk.

References

◉ AI THREAT BRIEFING

Stay ahead of the threat.

Twice-weekly digest of critical AI security developments — every story mapped to MITRE ATLAS and OWASP LLM Top 10. Free.

No spam. Unsubscribe anytime.