anomalyco / anomalyco/opencode
Permission asks from nested subagent sessions silently hang
@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
- Set bash permissions to "ask" for the build agent
- 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."
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.