Skip to content

Permission requests from child sessions do not get forwarded via ACP and hangs forever #12133

Closed

Description

@jonchun

Description

Summary

When OpenCode runs in ACP mode, permission requests originating from child sessions (e.g. Task subagents) are silently ignored. This causes those sessions to block indefinitely and appear frozen.

Problem

The ACP agent only handles permission requests for sessions it directly tracks. Child sessions created by Task subagents are not registered with the ACP session manager, so when they request permissions, the ACP agent drops the request without notifying the ACP client.

Expected Behavior

Permission requests from child sessions should be surfaced to the ACP client the same way as requests from the main session.

Impact
• Task subagents can deadlock
• No visible error or feedback to the user
• Difficult to diagnose without deep inspection

Plugins

No response

OpenCode version

OpenCode v1.1.51

Steps to reproduce

  1. Run OpenCode in ACP mode
  2. Trigger a Task subagent
    Use the Task tool to create a subagent that writes a test file to /tmp/opencode-permission-test.txt with the content "hello world", then reads it back and reports the contents.
    
  3. Observe the session freezing with no permission prompt

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Activity

  1. imadtg commented on Feb 4, 2026

    @imadtg

    this is also a bug in regular opencode TUI, subagent attempted access to non authorized files/folders just fail without prompting an authorization prompt like the main agent

  2. jonchun commented on Feb 4, 2026

    @jonchun
    Author

    this is also a bug in regular opencode TUI, subagent attempted access to non authorized files/folders just fail without prompting an authorization prompt like the main agent

    I could swear I've seen permission prompts from the subagent bubble up to the TUI before, but perhaps there are different ways for this to happen. This bug report was specific to ACP, and the TUI issue sounds different: (At least it is auto-declining). In ACP's case, it just hangs forever which is an unacceptable user experience.

  3. justfortheloveof commented on Feb 4, 2026

    @justfortheloveof
    Contributor

    this is also a bug in regular opencode TUI, subagent attempted access to non authorized files/folders just fail without prompting an authorization prompt like the main agent

    I could swear I've seen permission prompts from the subagent bubble up to the TUI before, but perhaps there are different ways for this to happen. This bug report was specific to ACP, and the TUI issue sounds different: (At least it is auto-declining). In ACP's case, it just hangs forever which is an unacceptable user experience.

    I'm under the impression that the bug in the TUI is where a subagent spawned by a subagent tries to request for permissions, then it doesn't bubble up / is never shown in the TUI and the sub-subagent is stuck waiting for permission.

    In other words:
    Primary agent > Subagent (permission requests bubbles up to primary agent/session)
    Primary agent > Subagent > Sub-subagent (permission requests do NOT bubble up, Sub-subagent stuck waiting for permission, but user cannot accept/deny)


    On a related note, it's a bit annoying that the permission prompt is only shown in the parent session where if you are looking at a subagent session, eventually it asks for permissions and you have to go back to the parent session to take action.

  4. jonchun commented on Feb 4, 2026

    @jonchun
    Author

    On a related note, it's a bit annoying that the permission prompt is only shown in the parent session where if you are looking at a subagent session, eventually it asks for permissions and you have to go back to the parent session to take action.

    100% agreed. it gets me every time.

    I'm under the impression that the bug in the TUI is where a subagent spawned by a subagent tries to request for permissions, then it doesn't bubble up / is never shown in the TUI and the sub-subagent is stuck waiting for permission.

    that makes sense. I think my PR for ACP didn't consider sub-subagents and I don't think that would work in that case. would need to walk up the parent recursively.

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions