[Bug] Uncontrolled recursive agent spawning causes excessive API usage and costs
Open 💬 3 comments Opened Jul 1, 2026 by d-schroeder-operayo
Bug Description
Major Bug: The agent spawned subagents for research, which in turn spawned their own subagents, which did the same. This spiralled out of control very fast, causing the session to burn over 600 Dollars. The main agent allowed this to happen by providing the tool to spawn further agents, which allowed this recursive spawning. This of course tore through my session limit right away, and ate into our API credits. There is no safeguard a user can fall back to (at least by default), besides a very low credit limit. This can't be the intended behavior and needs to be safeguarded against.
Environment Info
- Platform: darwin
- Terminal: Apple_Terminal
- Version: 2.1.197
- Feedback ID: a078a3bf-54c6-4643-ba88-156c61fc6867
Errors
[]This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗