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
Desktop app 2.2.5 (Windows): event stream disconnects every ~2-3s, background service restart loop, UI never opens #60878
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.
Activity
opencodejr commentedon Oct 31, 2026
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) sentserver.connectedon/api/eventimmediately, followed by heartbeats, and kept the stream open for 20 s or more. That matches what you saw withopencode 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.connectedevent, then retries after 1 s. That matches the ~3 s loop in your logs. Eachstarting v2 background serviceline 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:
renderer.logonly shows[object Object]. With DevTools open in the desktop app, the console entry[global-sdk] event stream disconnectedshould include anerrorfield, e.g.Timed out connecting to server.curl -N -u opencode:<password> http://127.0.0.1:<port>/api/event, using the port and password fromservice.json, and say whetherserver.connectedarrives and how quickly. Please don't post the password.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.