Summary
POST /session/{id}/prompt_async with noReply: false returns HTTP 204 but does not reliably trigger a new assistant turn when the session is idle. The message is accepted at the HTTP layer but the orchestration loop does not engage.
Steps to Reproduce
- Start an OpenCode session, let it complete its current task and go idle (waiting for user input)
- POST to
/session/{sessionID}/prompt_async with:
{"noReply": false, "parts": [{"type": "text", "text": "Please respond to this message."}]}
- Observe: HTTP 204 returned, but the session stays idle. No assistant response is generated.
- Manually type into the session → the injected message appears in history but was never acted on.
Expected Behavior
With noReply: false, the injected prompt should trigger a new assistant turn, just as if the user had typed it.
Context
We're building a multi-agent messaging system (relay-mesh) where agents running in different OpenCode sessions communicate via MCP tools. When Agent A sends a message to Agent B, we use prompt_async to notify B. This works when B is actively working (mid-tool-call), but fails when B is idle.
The behavior is intermittent — sometimes the session does wake up, sometimes it doesn't. This suggests a race condition in the session state machine rather than a fundamental design limitation.
Related Issues
Environment
- OpenCode v1.3.17
- Linux (Ubuntu 24.04)
- Multiple concurrent sessions via shared OpenCode server
Summary
POST /session/{id}/prompt_asyncwithnoReply: falsereturns HTTP 204 but does not reliably trigger a new assistant turn when the session is idle. The message is accepted at the HTTP layer but the orchestration loop does not engage.Steps to Reproduce
/session/{sessionID}/prompt_asyncwith:{"noReply": false, "parts": [{"type": "text", "text": "Please respond to this message."}]}Expected Behavior
With
noReply: false, the injected prompt should trigger a new assistant turn, just as if the user had typed it.Context
We're building a multi-agent messaging system (relay-mesh) where agents running in different OpenCode sessions communicate via MCP tools. When Agent A sends a message to Agent B, we use
prompt_asyncto notify B. This works when B is actively working (mid-tool-call), but fails when B is idle.The behavior is intermittent — sometimes the session does wake up, sometimes it doesn't. This suggests a race condition in the session state machine rather than a fundamental design limitation.
Related Issues
Environment