Skip to content

Desktop app 2.2.5 (Windows): event stream disconnects every ~2-3s, background service restart loop, UI never opens #60878

Open

Description

@cascaoconcurseiro

Title

Desktop app 2.2.5 (Windows): event stream disconnects every ~2-3s, background service restart loop, UI never opens

Environment

  • OpenCode desktop 2.2.5 (fresh reinstall from the official signed installer, same version)
  • OpenCode CLI 2.2.5 (npm global)
  • Windows 11 Pro 10.0.26300

Steps to reproduce

  1. Launch OpenCode desktop.
  2. The window does not reach the main UI.

Expected

The app connects to the local service and the UI opens.

Actual

  • Renderer log repeats every ~3s: [global-sdk] event stream disconnected.
  • Main log repeats every ~3s: starting v2 background service / v2 CLI background service ready.
  • Server log (%USERPROFILE%\.local\share\opencode\log\opencode.log) shows GET /api/event returning 200 and closing after 2-5 s, repeatedly.
  • The same binary run with opencode serve from npm keeps /event open (200, streams data).
  • The staged CLI in %APPDATA%\ai.opencode.desktop\cli\2.2.5-x64\ is byte-identical (SHA256 B54A65CA...) to the bundled resources\opencode-cli.exe.
  • Also seen: at startup GET /api/info returns 503 once.

Already tried (no effect)

  • Killed the orphaned opencode.exe server left from a previous session.
  • Moved %USERPROFILE%\.config\opencode\service.json aside (app regenerated it).
  • Reverted opencode.json to the pre-change version.
  • Silent reinstall of the same 2.2.5 installer.

Logs

Attach: %APPDATA%\ai.opencode.desktop\logs\20261031T115658\ (main.log, renderer.log). Do not attach service.json (contains a password).

Activity

  1. opencodejr commented on Oct 31, 2026

    @opencodejr

    Thanks for the detailed report and logs. I couldn't reproduce this here: it needs the desktop app on Windows, and my sandbox is Linux-only.

    What I could check: on Linux, the 2.2.5 CLI started as the shared background service (opencode service start) sent server.connected on /api/event immediately, followed by heartbeats, and kept the stream open for 20 s or more. That matches what you saw with opencode serve, so the CLI on its own doesn't show the problem.

    One thing from the code that may help: the app waits only 2 s for the first server.connected event, then retries after 1 s. That matches the ~3 s loop in your logs. Each starting v2 background service line is the app reconnecting after the stream drops, not the service crashing. So the stream from the desktop-started service is either slow to send its first event or gets closed early.

    These would help a maintainer with a Windows setup:

    • The real disconnect error. renderer.log only shows [object Object]. With DevTools open in the desktop app, the console entry [global-sdk] event stream disconnected should include an error field, e.g. Timed out connecting to server.
    • Whether the stream from the app's own service stays open. While the app is looping, run curl -N -u opencode:<password> http://127.0.0.1:<port>/api/event, using the port and password from service.json, and say whether server.connected arrives and how quickly. Please don't post the password.
    • Anything between the app and 127.0.0.1, such as antivirus, a firewall, a proxy or a VPN.

    Related issues, most likely first:

    A maintainer with a Windows environment will need to look at this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions