[BUG] Recursive subagent fan-out caused significant unexpected API/Bedrock charges; request guardrails and refund path
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Claude Code recursively spawned subagents during a normal research/planning task, causing a rapid and unexpected token/cost spike through AWS Bedrock.
The issue was not simply that multiple agents were used. The problem was that subagents appeared to have access to agent-orchestration tools and were able to spawn their own child agents, which then spawned additional agents. This created a recursive fan-out pattern that escalated much faster than a user could reasonably detect or stop.
There was no clear warning, cost estimate, approval prompt, hard agent-count cap, recursive-depth cap, or per-session spending limit before significant usage had already accumulated.
I am intentionally not posting exact billing details, organization/client names, account details, or internal task details publicly. I can provide redacted logs, billing evidence, and session analysis privately if needed.
This appears related to the same cost-safety failure pattern described in #68110 and #72732, where research-style prompts caused recursive subagent spawning and unexpected charges.
What Should Happen?
Claude Code should not allow recursive subagent fan-out to grow without explicit user approval and clear cost visibility.
Expected behavior:
- Subagents should not be able to spawn additional subagents by default.
- Recursive agent spawning should require explicit opt-in.
- There should be a hard default maximum agent count per user request.
- There should be a hard default recursive-depth limit.
- There should be a global concurrent-agent limit.
- Claude Code should warn the user before launching a large number of agents.
- Claude Code should show real-time token and estimated-cost usage for API/Bedrock users.
- Users should be able to define per-session or per-task spending limits.
- There should be a kill switch that stops the full agent tree.
- Interrupting a runaway task should preserve completed subagent outputs when possible.
This should also be treated as a billing/cost-safety incident. Please provide a clear refund or credit path for affected users, including users billed through AWS Bedrock rather than direct Anthropic API billing.
Error Messages/Logs
Steps to Reproduce
A general reproduction pattern appears to be:
- Ask Claude Code to perform a broad research or planning task.
- Claude Code launches one or more research subagents.
- Those subagents are allowed to use agent-orchestration tools.
- Subagents decompose the task further and launch child agents.
- Child agents recursively spawn more agents.
- Token usage escalates rapidly.
- The user only notices after substantial usage has already occurred.
This is consistent with the behavior reported in #68110 and #72732.
Claude Model
Sonnet (default)
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
v2.1.197 (Claude Code)
Platform
AWS Bedrock
Operating System
macOS
Terminal/Shell
iTerm2
Additional Information
This appears to be part of a broader cost-safety issue rather than an isolated usage mistake.
Related issues include:
- #68110 — recursive subagent fan-out from research tasks.
- #72732 — very similar report where recursive research subagents caused a large unexpected cost impact.
- #69395 — reports a very large number of subagent transcripts / Agent tool calls from recursive fan-out.
- #71423 — explicitly requests a refund for unauthorized or inefficient subagent usage.
- #72080 — reports subagents stuck in loops and consuming excessive tokens.
- #72127 — reports rapid plan/token exhaustion from multi-agent behavior without sufficient warning.
- #71481 — different root cause, but part of the broader pattern of Claude Code behavior changes causing unexpected cost impact without adequate visibility.
The key concern is that Claude Code can initiate or escalate expensive multi-agent behavior without enough default user control, transparency, or spending protection.
Please clarify:
- Whether Anthropic will reimburse or credit users affected by recursive subagent fan-out.
- Whether Anthropic will coordinate with AWS for Bedrock-based cases.
- What evidence affected users should provide.
- Which Claude Code versions are affected.
- Which version contains the definitive fix.
- What immediate mitigations users should apply until the fix is confirmed.
I can provide exact usage numbers, redacted billing evidence, and local session-log analysis privately if needed. I am not posting those details publicly because they may reveal organization, account, client, or internal project information.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗