Description
promptAsync starts prompt work in a forked effect and returns 204 immediately. Because the forked prompt effect does not explicitly provide the request's InstanceRef / WorkspaceRef, later background work can run with the default instance context instead of the request instance.
In integrations that depend on project-specific agent configuration, this can make subagent lookup see only default agents and fail to resolve custom agents.
The streaming prompt route already captures and provides the instance/workspace context around the prompt effect. promptAsync should do the same before forking.
Plugins
No response
OpenCode version
No response
Steps to reproduce
No response
Screenshot and/or share link
No response
Operating System
No response
Terminal
No response
Description
promptAsyncstarts prompt work in a forked effect and returns204immediately. Because the forked prompt effect does not explicitly provide the request'sInstanceRef/WorkspaceRef, later background work can run with the default instance context instead of the request instance.In integrations that depend on project-specific agent configuration, this can make subagent lookup see only default agents and fail to resolve custom agents.
The streaming
promptroute already captures and provides the instance/workspace context around the prompt effect.promptAsyncshould do the same before forking.Plugins
No response
OpenCode version
No response
Steps to reproduce
No response
Screenshot and/or share link
No response
Operating System
No response
Terminal
No response