anomalyco / anomalyco/opencode
Sub-sub-agents (depth: 2) "ask" permission doesn't surface to user and stalls
@kitlangton is already working on this.
Since Jul 27, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Description
When configuring OpenCode settings "subagent_depth" to 2, allowing subagents to deploy subagents at one level below, if a cascaded subagent tries to access any permission that is configured to "ask", the permission request never surfaces up to the user and the session stalls.
This can be easily tested with native "general" subagent by giving them access to deploy "explore" subagents.
Plugins
No response
OpenCode version
1.18.7
Steps to reproduce
- Setup your opencode.json settings with subagent depth 2 and grant a subagent like general with task access to deploy explore subagents:
{ "$schema": "https://opencode.ai/config.json", "subagent_depth": 2, "agent": { "general": { "tools": { "task": true }, "permission": { "task": { "*": "deny", "explore": "allow" } } } } }
-
Deploy a @general subagent asking to deploy a explore subagent to access any permission that would require "ask", e.g. external_directory access.
-
Sub-sub-agent permission request never surface to user and session stalls.
Screenshot and/or share link
Operating System
Ubuntu 24.04
Terminal
SSH over WSL
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.