anomalyco / anomalyco/opencode

Permission asks from nested subagent sessions silently hang

Open
#13,715 16 comments 31 reactions 1 assignee View on GitHub

@rekram1-node is already working on this.

Since Feb 15, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
Avg merge
7h 2m
Merged PRs (30d)
384

Description

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

https://github.com/user-attachments/assets/fa45a072-63e1-48bb-b4f4-90d3c01490a1

Operating System

macOS 26.1 (25B77)

Terminal

Ghostty

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.