[BUG] Subagent cascade bug: Multiple parallel instances spawn on test failure
Resolved 💬 4 comments Opened Sep 21, 2025 by mstHex Closed Jan 9, 2026
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?
Description
When a subagent creates a Python test script that encounters an error during execution, Claude Code spawns multiple parallel instances of the same subagent task instead of handling the failure gracefully.
Steps to Reproduce
- Initiate a task that requires creating a test script
- Have the subagent (in this case "flow-hawk") create a test file
- When the test file encounters an error during execution
- Observe multiple parallel instances of the same subagent task spawning
Actual Behavior
- Multiple "flow-hawk" instances executing "Implement adaptive window sizing" in parallel
- Redundant parallel execution of the same task
- Resource waste and potential conflicts from parallel writes
Evidence
<img width="507" height="799" alt="Image" src="https://github.com/user-attachments/assets/965f8cdc-3913-411f-83b0-f077c58b689f" />
Environment
- Claude Code version: 1.0.120
- OS: macOS Tahoe 26
- Context: Creating test_adaptive_integration.py (134 lines)
Impact
- Performance degradation
- Resource exhaustion
- Potential file conflicts from parallel writes
- Poor user experience requiring manual interruption (ctrl+t)
What Should Happen?
Expected Behavior
- Single subagent should handle test failure and retry/fix
- Error handling should be sequential, not parallel
- No duplicate subagent instances should spawn
Error Messages/Logs
Steps to Reproduce
- Ask Claude Code to create a Python module with tests:
"Create an adaptive window sizing module with unit tests"
- When it creates the test file, ensure it fails by asking:
"Make the test import a non-existent module"
- Watch Claude Code attempt to run the failing test
- Bug: Multiple parallel "flow-hawk" subagents spawn immediately (20+ instances all running "Implement adaptive window sizing")
Minimal trigger code:
# test_adaptive_integration.py
from non_existent_module import Something # This import fails
def test_something():
pass
Result: Cascade of parallel subagents instead of single error handling
### Claude Model
Opus
### Is this a regression?
Yes, this worked in a previous version
### Last Working Version
_No response_
### Claude Code Version
1.0.120
### Platform
Other
### Operating System
macOS
### Terminal/Shell
VS Code integrated terminal
### Additional Information
_No response_This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗