Skip to content

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

@jonchun

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

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