Desktop app: SSE event stream broken with custom remote server (regression) #9117

Closed
opened 2026-02-16 18:11:41 -05:00 by yindo · 2 comments
Owner

Originally created by @alexandrereyes on GitHub (Feb 11, 2026).

Originally assigned to: @adamdotdevin on GitHub.

Description

Desktop app v1.1.59 (macOS ARM) connects to a custom remote server and sends messages successfully, but never receives SSE events back — the UI stays stuck after sending a prompt.

The same server works perfectly in a regular browser. It was working fine on v1.1.53.

Setup

  • Custom server URL pointing to a self-hosted OpenCode instance exposed via Twingate zero-trust network (no sidecar, no Basic Auth)
  • macOS aarch64

Symptoms

  • Health checks pass, sessions load, messages are sent and processed by the server
  • Server logs confirm the LLM responds and events are published
  • But the /global/event SSE stream never delivers events to the UI
  • In a regular browser pointed at the same server, everything works
Image
Originally created by @alexandrereyes on GitHub (Feb 11, 2026). Originally assigned to: @adamdotdevin on GitHub. ## Description Desktop app v1.1.59 (macOS ARM) connects to a custom remote server and sends messages successfully, but **never receives SSE events back** — the UI stays stuck after sending a prompt. The same server works perfectly in a regular browser. It was working fine on v1.1.53. ## Setup - Custom server URL pointing to a self-hosted OpenCode instance exposed via **Twingate zero-trust network** (no sidecar, no Basic Auth) - macOS aarch64 ## Symptoms - Health checks pass, sessions load, messages are sent and processed by the server - Server logs confirm the LLM responds and events are published - But the `/global/event` SSE stream never delivers events to the UI - In a regular browser pointed at the same server, everything works <img width="1275" height="242" alt="Image" src="https://github.com/user-attachments/assets/92a75852-bad6-4f9b-98ed-68409f2ee1d5" />
yindo added the web label 2026-02-16 18:11:41 -05:00
yindo closed this issue 2026-02-16 18:11:41 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Feb 11, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #11522: SSE events not emitted when using opencode attach --dir — similar SSE delivery issue with server connections
  • #8406: Connection hangs with non-standard SSE/HTTP servers — SSE/HTTP server compatibility issues
  • #10077: SDK SSE client ignores custom fetch — SSE subscription issues in certain environments
  • #12453: Web UI response stream breaks on certain clients — similar symptoms of stream delivery failures

These may share a common root cause related to SSE event delivery over custom/remote server connections.

@github-actions[bot] commented on GitHub (Feb 11, 2026): This issue might be a duplicate of existing issues. Please check: - #11522: SSE events not emitted when using `opencode attach --dir` — similar SSE delivery issue with server connections - #8406: Connection hangs with non-standard SSE/HTTP servers — SSE/HTTP server compatibility issues - #10077: SDK SSE client ignores custom fetch — SSE subscription issues in certain environments - #12453: Web UI response stream breaks on certain clients — similar symptoms of stream delivery failures These may share a common root cause related to SSE event delivery over custom/remote server connections.
Author
Owner

@alexandrereyes commented on GitHub (Feb 11, 2026):

Regarding the potential duplicates flagged by the bot:

  • #10077 is directly related — it reports that the SDK SSE client ignores custom fetch, falling back to globalThis.fetch. That issue is about the SDK level (serverSentEvents.gen.js), while this one manifests in the desktop app because eventSdk in global-sdk.tsx doesn't pass platform.fetch at all. If #10077 was fixed at the SDK level, this issue may still exist at the app level since platform.fetch is never passed to the SSE client.
  • #11522 is a different issue (SSE events not emitted with --dir flag)
  • #8406 is about MCP server connections hanging, unrelated
  • #12453 is about mobile browser HTTP stream breaking on /message POST, different symptom and endpoint

This is a regression — the desktop app with the same custom server setup was working on v1.1.53 and broken on v1.1.59.

@alexandrereyes commented on GitHub (Feb 11, 2026): Regarding the potential duplicates flagged by the bot: - **#10077** is directly related — it reports that the SDK SSE client ignores custom `fetch`, falling back to `globalThis.fetch`. That issue is about the SDK level (`serverSentEvents.gen.js`), while this one manifests in the desktop app because `eventSdk` in `global-sdk.tsx` doesn't pass `platform.fetch` at all. If #10077 was fixed at the SDK level, this issue may still exist at the app level since `platform.fetch` is never passed to the SSE client. - **#11522** is a different issue (SSE events not emitted with `--dir` flag) - **#8406** is about MCP server connections hanging, unrelated - **#12453** is about mobile browser HTTP stream breaking on `/message` POST, different symptom and endpoint This is a **regression** — the desktop app with the same custom server setup was working on v1.1.53 and broken on v1.1.59.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#9117