[Bug]: OpenCode provider freezes on first message — SSE events silently dropped #2691
Before submitting#
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area#
apps/desktop
Steps to reproduce#
- Configure an OpenCode provider in t3code (no server URL → spawns local opencode serve)
- Verify provider shows as connected with models listed
- Start a new session
- Send any message
Expected behavior#
Events stream back via SSE (content deltas, tool calls, turn completion).
Actual behavior#
promptAsync returns 204 immediately. The composer/turn starts but no content or error ever arrives. Session stays in "running" state indefinitely. The event.subscribe() SSE stream IS receiving events — verified by hitting GET /global/event directly — but handleSubscribedEvent drops every one.
Impact#
Major degradation or frequent failure
Version or commit#
main @ latest (also affects published v0.0.23 based on bundled SDK range ^1.3.15)
Environment#
macOS, any browser, any Bun/Node version. Reproduced with opencode CLI v1.14.50 and @opencode-ai/sdk v1.4.7.
Logs or stack traces#
Root cause: The opencode server wraps SSE events in a payload envelope:
{"payload": {"type": "session.status", "properties": {"sessionID": "ses_...", ...}}}
But handleSubscribedEvent at apps/server/src/provider/Layers/OpenCodeAdapter.ts:311 reads event.properties.sessionID instead of event.payload.properties.sessionID. Since the session ID check always evaluates to undefined !== "ses_...", ALL events are silently discarded.
Screenshots, recordings, or supporting files#
Workaround#
Run t3code from source with the patch applied. Alternatively, pin an older opencode CLI version that didn't use the payload wrapper.
olllayor(GitHub profile, opens in a new tab) added labelsbug
olllayor(GitHub profile, opens in a new tab) added labelsneeds-triage
Same issue
Same issue
having the same issue here. To reproduce: same as OP.
Im on version 0.0.25-nightly.20260515.295
Can confirm this issue on latest version 0.0.24 (ea20e8002164)
This is still open but with latest opencode version and latest nightly version is fixed for me. 0 errors. (Maybe it gets stuck with a bash call that takes time but i think that might be the model problem and not the program)
juliusmarminge closed this
Sign in to join this conversation.
I can confirm I have the same issue