Skip to content

Permission asks from nested subagent sessions silently hang #13715

@ro-hansolo

Description

@ro-hansolo

Description

When a subagent spawns another subagent that requires permission (e.g. bash), the permission ask is emitted but never rendered in the TUI. The session hangs forever waiting for a response that never comes.
The children() memo in src/cli/cmd/tui/routes/session/index.tsx only collects direct child sessions. Permission and question events from grandchild sessions (sub-sub-agents) are never picked up.
Repro: have a general subagent spawn another general subagent that runs a bash command with "ask" permissions. The inner agent's permission request is invisible to the user.

Plugins

None

OpenCode version

1.2.4

Steps to reproduce

  1. Set bash permissions to "ask" for the build agent
  2. Send the prompt: Spawn a general subagent with this task: "Spawn another general subagent with this task: 'Run ls -la using bash and report the output.' Report back what it says."
  3. The innermost general subagent requests bash permission but no prompt appears in the TUI. The session hangs indefinitely

Screenshot and/or share link

Screen.Recording.2026-02-15.at.3.58.30.PM.mov

Operating System

macOS 26.1 (25B77)

Terminal

Ghostty

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingopentuiThis relates to changes in v1.0, now that opencode uses opentui

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions