You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEATURE]: Document infinite subagent recursion risk when permission.task is set globally #17722
I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
The problem: Adding "task": "allow" to the global permission block silently enables infinite subagent recursion. There's no depth limit in the codebase — subagents spawn subagents indefinitely, each with its own steps counter and context window. I hit 10 levels of nesting and 3+ hours of runaway token usage before noticing.
Why it's a trap: The default "*": "allow" wildcard does NOT trigger this — only an explicit "task" key does. So adding "task": "allow" alongside other permissions like "bash": "allow" seems harmless but completely overrides the built-in nesting guard in task.ts:
Activity
docs(agents,permissions,config): warn about infinite subagent recursi…
github-actions commentedon Mar 16, 2026
This issue might be a duplicate of or closely related to existing issues. Please check:
github-actions commentedon Jul 7, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.