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
Permission prompts from nested subagents are never shown and the tool call hangs #30635
When a subagent spawns its own subagent, any permission or question prompt raised inside that nested subagent is never shown. The prompt carries the deepest session's id, but every UI consumer only recognizes the sessions it directly tracks, so the prompt is published to the bus and then dropped.
On the server side the Permission.ask deferred never resolves, so any tool that goes through ctx.ask hangs forever. That includes every MCP tool, which is where this usually surfaces: it looks like "MCP auth fails" or an MCP tool that just never returns.
This affects the TUI, opencode run, and the ACP integration, since each one decides which prompts are "mine" by checking the sessions it directly tracks rather than the whole descendant tree.
This is distinct from #16491, where subagent MCP tools are blocked by a missing permission grant and denied at execution. Here the prompt is never routed to any UI, so the call hangs rather than being denied.
I have a fix that routes these prompts to the ancestor session the UI actually knows about.
Plugins
None
OpenCode version
1.15.13
Steps to reproduce
Run a session that spawns a subagent, and have that subagent spawn another subagent (two levels deep).
Have the deepest subagent call a tool that needs a permission prompt: an MCP tool, or bash with a pattern that isn't pre-approved.
No prompt appears, and the tool call hangs indefinitely.
Activity
github-actions commentedon Jun 3, 2026
This issue might be a duplicate of existing issues. Please check:
If your issue is distinct (e.g., your fix addresses something these don't), please clarify the difference so we can keep this open.
literally-dan commentedon Jun 3, 2026
Closing as a duplicate of #13715, which describes the same nested-subagent permission hang and came first. Tracking the fix there.