Claude Code now counts how many subagents you spawn, but nothing shows you that number yet.
An in-memory subagent spawn counter with a snapshot accessor exists but has no surface in this build.
What's wrong with this entry?
A counter now tracks subagent activity for the life of the process and exposes it as a snapshot, with no user-facing surface in this build.
- Records spawns by requested mode (background, foreground, unset), how many started in the background, maximum nesting depth, spawns made by other subagents, and counts per agent type.
- Also records completions, failures, kills split into parent/user/system, and refusals split into depth limit, concurrency limit and budget.
- An
agentSpawnedevent fires on every spawn.
spawned_by_subagents
Strings lifted out of the shipped bundle, so the claim above can be checked against them.
Related
Other releases about the same thing. Found by shared names or similar wording; neither means one caused the other.
-
v2.1.234
Another forged control tag is escaped in subagent output
Both mention subagent
-
v2.1.234
Spawned processes get
--flag=valuewhen the value looks like a flagBoth mention subagent
-
v2.1.235
New error for delegating to a subagent without naming one
Both mention subagent