Repository navigation
Closed as not planned
Closed as not planned
Copy link
Description
Desktop app: Sidecar dies silently after 1-4 minutes, causing no response to messages
Description
The OpenCode Desktop app (Electron) on Windows starts correctly but the sidecar process exits silently within 1-4 minutes of startup. After this happens, any message sent from the renderer gets no response because the server is no longer running. The terminal and antigravity versions work perfectly since they don't use the sidecar architecture.
Steps to Reproduce
- Open OpenCode Desktop app
- Wait 1-4 minutes
- Type any message (e.g., "hola")
- No response is received
Expected Behavior
The sidecar should stay alive for the duration of the session, or automatically restart if it crashes.
Actual Behavior
The sidecar exits with code 0 (clean exit, not a crash) and is never restarted. The renderer loses its SSE connection and all subsequent requests fail silently.
Evidence
Sidecar exit pattern (all sessions from today):
| Session | Start | Sidecar Exit | Time Alive |
|---|---|---|---|
| 20260823T142903 | 10:29:03 | 10:31:30 | ~2 min |
| 20260823T142435 | 10:24:35 | 10:28:58 | ~4 min |
| 20260823T141119 | 10:11:20 | 10:13:21 | ~2 min |
| 20260823T140942 | 10:09:42 | 10:09:44 | <1 min |
| 20260823T001753 | 20:17:53 | 20:19:26 | ~1.5 min |
| 20260823T001410 | 20:14:13 | 20:17:47 | ~3.5 min |
utility.log entry (consistent across all sessions):
[warn] (utility) sidecar exited { code: 0 }
main.log shows normal startup every time:
[info] sidecar connection started { version: 'v1' }
[info] spawning sidecar { url: 'http://127.0.0.1:XXXXX' }
[info] server ready { url: 'http://127.0.0.1:XXXXX' }
// ... then nothing after this, sidecar dies silently
Crash dump present:
bf0ed3e9-6d0c-4a80-a906-b5fb6593b53e.dmp— 33MB, dated 2026-08-10
Renderer log errors (in sessions that lasted longer):
[error] ResizeObserver loop completed with undelivered notifications.
(Dozens of these per session)
Environment
- OS: Windows 10 Home (64-bit), version 2009
- CPU: 12th Gen Intel Core i9-12900H
- OpenCode Desktop version: 1.18.21 (packaged)
- Install path:
C:\Users\joseh\AppData\Local\Programs\@opencode-aidesktop
Additional Context
- The terminal version (
opencodeCLI) works perfectly — no sidecar involved - The antigravity version also works fine
- The issue is specific to the Electron desktop app's sidecar management
- The sidecar process exits with code 0, suggesting a clean shutdown rather than a crash
- No automatic restart mechanism exists for the sidecar
Possible Root Causes
- SSE heartbeat timeout: The 10-second heartbeat may be missed by Electron's utility process scheduler on Windows, causing the server to close the connection
- Port allocation race condition (TOCTOU): The dynamic port is freed by
socket.close()before the sidecar binds to it - Provider bootstrap failure: v1.18.5+ regression where provider/model/MCP fail to load silently
Suggested Fixes
- Add automatic sidecar restart with exponential backoff on unexpected exit
- Add a health check timeout (current
ready()loop has no max retry) - Fix the SSE heartbeat timing for Windows Electron environment
- Add renderer-side reconnection logic when SSE drops
Metadata
Metadata
Assignees
Labels
No labels
Activity
github-actions commentedon Aug 23, 2026
This issue might be a duplicate of existing issues. Please check:
Failed to fetch, Windows-only, no restart mechanism)Failed to fetch— same platform and failure modeFailed to fetchIn particular, #30597 describes the same silent exit pattern with a similar session-uptime table and the same
[warn] (utility) sidecar exitedlog entry.thdxr commentedon Oct 11, 2026
Thanks for the report! OpenCode 2.0 is now out and development is focused on V2, so we're closing issues filed against OpenCode 1. Please upgrade (
opencode upgrade --major, details: https://anoma.ly/notes/opencode-2-0), and if this is still relevant on 2.0, reopen this issue or open a new one with your 2.0 version.— from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊