Skip to content

Permission prompts not propagated at subagent_depth 2 — subagent hangs waiting for approval #43996

Closed as not planned

Description

@deuriib

Description

Description

When subagent_depth is set to 2, permission prompts (e.g., "ask" for bash)
from a depth-2 subagent never reach the user. The subagent hangs indefinitely
waiting for approval that never arrives.

Config

{
  "subagent_depth": 2,
  "permission": {
    "bash": { "*": "ask" }
  }
}

Reproduction Steps
1. Set subagent_depth: 2 in opencode.json
2. Set permission.bash: { "*": "ask" }
3. From primary agent, dispatch to a subagent(mode=all) (e.g., @vasquez)
4. That subagent dispatches to another subagent(mode:subagent) (e.g., @general)
5. The depth-2 subagent tries to run a bash command (e.g., git status)

Expected Behavior
The permission approval prompt should appear in the TUI, allowing the user 
to approve or reject the command — same as it does for depth-1 subagents.

Actual Behavior
The depth-2 subagent blocks indefinitely. The permission prompt never reaches 
the user. No UI element appears. The session must be interrupted manually.

Workaround
- At depth 1 (primary → subagent → bash), prompts work correctly
- Setting bash commands to "allow" avoids the prompt entirely
- Having the depth-1 orchestrator execute bash directly also works

Environment
- OS: Windows (PowerShell)
- opencode version: 1.18.19
- Model: opencode/big-pickle

### Plugins

superpowers

### OpenCode version

1.18.19

### Steps to reproduce

1. Set subagent_depth: 2 in opencode.json
2. Set permission.bash: { "*": "ask" }
3. From primary agent, dispatch to a subagent(mode=all) (e.g., @vasquez)
4. That subagent dispatches to another subagent(mode:subagent) (e.g., @general)
5. The depth-2 subagent tries to run a bash command (e.g., git status)

### Screenshot and/or share link

_No response_

### Operating System

Windows 11

### Terminal

Windows Terminal

Activity

  1. github-actions commented on Aug 21, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    If your issue is the same, please add a "+1" or additional context there rather than opening a new report.

  2. thdxr commented on Oct 11, 2026

    @thdxr
    Member

    Thanks for the report! OpenCode 2.0 is now out and development is focused on V2, so we're closing issues filed against OpenCode 1. Please upgrade (opencode upgrade --major, details: https://anoma.ly/notes/opencode-2-0), and if this is still relevant on 2.0, reopen this issue or open a new one with your 2.0 version.

    — from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions