You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bug: SSE /event stream closes immediately after server.connected event #26697
The opencode server's event stream (GET /event) terminates the connection immediately after sending the initial server.connected event. No subsequent bus events (e.g., message.part.delta, message.part.updated) are received by the client, despite the server logs showing that these events are being published internally.
Version Regression: The issue is present in v1.14.46 but is completely resolved when rolling back to v1.14.41.
Likely cause:
The regression appears to have been introduced between v1.14.41 and v1.14.46. A strong suspect is the introduction of HTTP API response compression in v1.14.42, which may be incorrectly buffering or terminating the long-lived SSE stream.
OpenCode version
1.14.46
Operating System
Ubuntu 24.04
Terminal
WezTerm
Reacted by Baroque Cat, Mihály Tóth, SilentE, Li Zhihao, Alexandre Desjardins, Justin Vaillancourt, KryptXBSA, Thai Pangsakulyanont, Tommy D. Rossi, stmald and 3 more
This issue might be a duplicate of existing issues. Please check:
prompt_async silently discards requests in v1.14.44 (SSE path broken) #26635: Same symptom — SSE /event stream only receives server.connected and then closes with no subsequent events (message.part.delta, etc.) after using prompt_async. That issue also identifies this as a regression starting in v1.14.44+, which overlaps with your reported broken version (v1.14.46).
I am experiencing this issue too while testing Kimaki and making my own lightweight Discord bridge. It seems the /event endpoint is no longer used by first-party user interface.
Instead, both the TUIand the Web app now uses the /global/event endpoint. Migrating the app to the new SDK method sdk.global.event worked around this issue.
I am experiencing this issue too while testing Kimaki and making my own lightweight Discord bridge. It seems the /event endpoint is no longer used by first-party user interface.
Instead, both the TUIand the Web app now uses the /global/event endpoint. Migrating the app to the new SDK method sdk.global.event worked around this issue.
Thanks for the info. Unfortunately the /global/event does not fix our issue, as the messages do not contain the text property, so we still cannot stream the events to the buffer with it.
Adding another data point: this regression also affects in-process plugin event delivery (via bus.subscribeAll()), not just the external SSE /event stream.
I have a server-side plugin that subscribes to bus events to drive a status reporter. Bisecting between v1.14.41 (works) and v1.14.42 (broken) — identical to @lokikl's bisect — I captured exactly which events the plugin's event handler receives:
v1.14.41 — outer event types seen by bus.subscribeAll():
Missing in v1.14.42: message.part.updated, message.updated, session.created.
The session data is still correctly persisted — GET /session/{id}/message returns the full assistant message with step-start, text, step-finish parts — but the bus never announces those parts to plugin subscribers. Net effect: any plugin that drives state machines off message.part.updated (step-start / text / reasoning / tool / step-finish) stops working silently.
#26936 ("fix(tui): scope events by project", merged into dev today) appears to address the TUI side via a new event-subscription API with metadata, but it doesn't change bus.subscribeAll(), which is what plugins (and any non-TUI subscriber) use. Just flagging so the in-process plugin case isn't missed when the fix lands.
On Arch Linux with bun 1.3.13, the 1.14.41 binary unfortunately crashes on startup (segfault in bun executable — different issue from the SSE bug). This makes the clean rollback inaccessible for us.
The HTTP API compression theory (introduced v1.14.42) is compelling — would be great if that could be verified/toggled independently of a full version change.
Thanks for the suggestion! I will try that out. Is this change documented somewhere? Such a breaking change should probably be well explained if it was intended
Activity
github-actions commentedon May 10, 2026
This issue might be a duplicate of existing issues. Please check:
/eventstream only receivesserver.connectedand then closes with no subsequent events (message.part.delta, etc.) after usingprompt_async. That issue also identifies this as a regression starting in v1.14.44+, which overlaps with your reported broken version (v1.14.46).lokikl commentedon May 10, 2026
I found that v1.14.41 works, but v1.14.42 is already broken. This narrows the regression window down to the changes introduced in v1.14.42.
fix(server): recover OpenCode turns when 1.14.42+ SSE drops early (#902)
sudo-tee commentedon May 11, 2026
This affect my opencode plugin, It does not work anymore when streaming new messages.
sudo-tee/opencode.nvim#374
KryptXBSA commentedon May 11, 2026
I’m experiencing the same issue. v1.14.41 works, but newer versions up to 1.14.48 are broken.
dtinth commentedon May 12, 2026
I am experiencing this issue too while testing Kimaki and making my own lightweight Discord bridge. It seems the /event endpoint is no longer used by first-party user interface.
Instead, both the TUI and the Web app now uses the
/global/eventendpoint. Migrating the app to the new SDK methodsdk.global.eventworked around this issue.sudo-tee commentedon May 12, 2026
Thanks for the info. Unfortunately the /global/event does not fix our issue, as the messages do not contain the text property, so we still cannot stream the events to the buffer with it.
angelolloqui commentedon May 12, 2026
Adding another data point: this regression also affects in-process plugin event delivery (via
bus.subscribeAll()), not just the external SSE/eventstream.I have a server-side plugin that subscribes to bus events to drive a status reporter. Bisecting between v1.14.41 (works) and v1.14.42 (broken) — identical to @lokikl's bisect — I captured exactly which events the plugin's event handler receives:
v1.14.41 — outer event types seen by
bus.subscribeAll():v1.14.42 — outer event types seen by
bus.subscribeAll():Missing in v1.14.42:
message.part.updated,message.updated,session.created.The session data is still correctly persisted —
GET /session/{id}/messagereturns the full assistant message with step-start, text, step-finish parts — but the bus never announces those parts to plugin subscribers. Net effect: any plugin that drives state machines offmessage.part.updated(step-start / text / reasoning / tool / step-finish) stops working silently.#26936 ("fix(tui): scope events by project", merged into dev today) appears to address the TUI side via a new event-subscription API with metadata, but it doesn't change
bus.subscribeAll(), which is what plugins (and any non-TUI subscriber) use. Just flagging so the in-process plugin case isn't missed when the fix lands.sczi commentedon May 13, 2026
I ran into this issue with my emacs opencode integration: https://codeberg.org/sczi/opencode.el
I switched to subscribing to the /global/event endpoint and everything is working again. @angelolloqui in 1.14.48 with the /global/event endpoint I do receive
session.created,message.updated, etc events.Canahmetozguven commentedon May 13, 2026
Confirming this matches our openchamber/openchamber#1258 and #27319.
On Arch Linux with bun 1.3.13, the 1.14.41 binary unfortunately crashes on startup (segfault in bun executable — different issue from the SSE bug). This makes the clean rollback inaccessible for us.
The HTTP API compression theory (introduced v1.14.42) is compelling — would be great if that could be verified/toggled independently of a full version change.
sudo-tee commentedon May 13, 2026
I also switched to the global/event endpoint and normalized the events so they match and it resolved the issue in the meantime
angelolloqui commentedon May 13, 2026
Thanks for the suggestion! I will try that out. Is this change documented somewhere? Such a breaking change should probably be well explained if it was intended
thdxr commentedon May 14, 2026
this wasn't intended we're looking into it now
rekram1-node commentedon May 14, 2026
fixed: b928a1f
fix(server): recover OpenCode turns when 1.14.42+ SSE drops early (#902)
fix(server): recover OpenCode turns when 1.14.42+ SSE drops early (ge…