anomalyco / anomalyco/opencode

Sub-sub-agents (depth: 2) "ask" permission doesn't surface to user and stalls

Open
#39,112 2 comments 5 reactions 1 assignee View on GitHub

@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
  1. 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" } } } } }

  1. Deploy a @general subagent asking to deploy a explore subagent to access any permission that would require "ask", e.g. external_directory access.

  2. Sub-sub-agent permission request never surface to user and session stalls.

Screenshot and/or share link
Image Image Image Image
Operating System

Ubuntu 24.04

Terminal

SSH over WSL

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.