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
Subagents can still recursively self-dispatch with global task permission (v1.17.20) #36878
This is a fresh reproduction of #18100 on OpenCode 1.17.20. That issue was automatically closed for inactivity with instructions to open a new issue if the problem remained relevant.
With global permission.task: "allow", a custom subagent can dispatch another instance of itself:
We observed depth 2 and stopped further nesting by setting task: false on the reviewer. Current dev still has no hard runtime depth limit or same-agent cycle guard.
Expected: OpenCode should enforce a maximum nesting depth and/or reject same-agent self-dispatch with an explicit error.
Actual: each child can retain Task permission and create another child. Per-session step limits do not bound the whole tree.
Impact: runaway sessions, tokens, execution time, and more opportunities for a child permission wait to block the parent chain.
Activity