โ Browse
subagent-spawn-cap
karanb192 โ
524
This PreToolUse hook tracks cumulative subagent spawns across a Claude Code session and prompts for approval at configurable thresholds (default: ask at spawn 20, deny at spawn 60), counting nested spawns from inside subagents toward a shared per-session budget. It restores the spawn-cap guard that Claude Code removed in version 2.1.224, using an append-only ledger to prevent budget-counting race conditions during parallel spawns.
Install
> /plugin marketplace add karanb192/claude-code-hooks/tree/HEAD/plugins/subagent-spawn-cap
> /plugin install subagent-spawn-cap
Source: https://github.com/karanb192/claude-code-hooks/tree/HEAD/plugins/subagent-spawn-cap
What it's made of
1 hook
- Commands
- 0
- Agents
- 0
- Skills
- 0
- MCP servers
- 0
- Hooks
- 1 ยท PreToolUse
What it needs & plugs into
- API keys
- none
- Paid services
- none detected
- External tools
node- Talks to
- nothing external detected
Facts extracted from the plugin's files. Prose generated by claude-haiku-4-5-20251001.
Is this your plugin?
Claim it to keep the card accurate and enter the weekly contest. Requires signing in as the GitHub owner (karanb192).