anomalyco / anomalyco/opencode
ACP drops permission requests from Task subagent sessions
@jlongster is already working on this.
Since Sep 9, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Description
When OpenCode runs as an ACP agent, a permission request from a Task subagent is never forwarded to the connected ACP client. The subagent then waits indefinitely for a reply the client cannot send.
This still reproduces on dev (1.18.30).
The global ACP event subscription forwards permission.asked to the permission handler. The handler then looks up the event sessionID in the ACP session store and returns early when it is absent.
The store contains only sessions created through ACP session/new, session/load, session/resume, or session/fork. A Task subagent has its own session ID and is created outside that store, so its permission request is dropped without either forwarding it to the client or replying to OpenCode.
The same missing child-session mapping also causes child tool and text events to be invisible to ACP clients.
Related issues: #21802 and #32388, both closed automatically for inactivity rather than fixed.
Plugins
None
OpenCode version
dev (1.18.30)
Steps to reproduce
- Start
opencode acpand connect an ACP client that implementsrequestPermission. - Create a root session and prompt it to use the Task tool to delegate reading a file outside the session working directory.
- Observe OpenCode emit
permission.askedfor the child session. - Observe that the ACP client
requestPermissioncallback is never invoked and the Task remains running.
Expected behavior
ACP should map the child session to its registered root ACP session and forward the permission request using that root session ID. The selected response must still be relayed to the original child session.
Actual behavior
The child session is absent from the ACP session store, so the permission handler returns without forwarding or replying. The subagent remains blocked indefinitely.
Operating System
macOS
Terminal
ACP stdio client
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.