anthropics / anthropics/claude-code

[Bug] Sub-agent spawning ignores user constraints and exhausts token quota

Open
#94,240 0 comments 0 reactions 0 assignees View on GitHub
area:agents area:cost bug platform:macos
Dominant language
Python
Stars
145k
Forks
23.1k
PR merge metrics
PR metrics pending

Description

**Bug Description**
I have specifically asked not to spawn multiple sub agents and still it exhausted all my tokens by spawning so many subagents. Also, on checking the usage, the usage always showed lower number after recent update. to get correct usage stats, I need to restart claude everytime.
**Environment Info**
- Platform: darwin
- Terminal: iTerm.app
- Version: 2.1.270
- Feedback ID: 9d73191d-0210-4b79-b373-6f836d93d662

**Errors**
```json
[]
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce on darwin with iTerm.app and version 2.1.270, checking both sub-agent behavior after a no-multiple-agents instruction and usage immediately after activity. Trace the relevant sub-agent spawning and usage-stat paths; done means user constraints prevent excess spawning and usage remains accurate without restarting Claude.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.