What
When a Task launch is turned down, the session now records why alongside the existing telemetry, giving three named reasons: depth_limit for the nesting cap, concurrency_limit for too many at once, and budget for an exhausted allowance.
Details
- The depth cap still throws the same error naming
CLAUDE_CODE_MAX_SUBAGENT_SPAWN_DEPTH; the refusal is recorded just before it throws. - Task rows gained a
spawnedSubagentfield, andspawnDepthis now written only when it applies. - The concurrency check reads the session's effort setting through a new accessor rather than off the app state directly.
Evidence
recordRefused("depth_limit"), recordRefused("concurrency_limit")
Strings lifted out of the shipped bundle, so the claim above can be checked against them.