Skip to content
Source
Sign inSign up
pingdotgg/t3code

[Bug]: OpenCode provider freezes on first message — SSE events silently dropped #2691

Closedolllayor(GitHub profile, opens in a new tab) opened this issue 7 comments

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

  1. Configure an OpenCode provider in t3code (no server URL → spawns local opencode serve)
  2. Verify provider shows as connected with models listed
  3. Start a new session
  4. 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

SCR-20260514-ooro.jpeg

Workaround

Run t3code from source with the patch applied. Alternatively, pin an older opencode CLI version that didn't use the payload wrapper.

  1. olllayor(GitHub profile, opens in a new tab) added labelsneeds-triage

  2. I can confirm I have the same issue

  3. having the same issue here. To reproduce: same as OP.

    Im on version 0.0.25-nightly.20260515.295

  4. Can confirm this issue on latest version 0.0.24 (ea20e8002164)

  5. 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)

  6. Duplicate of #2644

    Same regression — OpenCode SSE events silently dropped by the adapter (the root cause pinned here matches the discussion there). Thanks for the sharp diagnosis; linking it from the canonical issue #2644 so it informs the fix.

  7. juliusmarminge closed this

Sign in to join this conversation.