Skip to content

Desktop app: Sidecar dies silently after 1-4 minutes, causing no response to messages #44475

Closed as not planned

Description

@Torukmaktocode

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

  1. Open OpenCode Desktop app
  2. Wait 1-4 minutes
  3. Type any message (e.g., "hola")
  4. 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 (opencode CLI) 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

  1. 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
  2. Port allocation race condition (TOCTOU): The dynamic port is freed by socket.close() before the sidecar binds to it
  3. Provider bootstrap failure: v1.18.5+ regression where provider/model/MCP fail to load silently

Suggested Fixes

  1. Add automatic sidecar restart with exponential backoff on unexpected exit
  2. Add a health check timeout (current ready() loop has no max retry)
  3. Fix the SSE heartbeat timing for Windows Electron environment
  4. Add renderer-side reconnection logic when SSE drops

Activity

  1. github-actions commented on Aug 23, 2026

    @github-actions
    Contributor

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

    In particular, #30597 describes the same silent exit pattern with a similar session-uptime table and the same [warn] (utility) sidecar exited log entry.

  2. thdxr commented on Oct 11, 2026

    @thdxr
    Member

    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 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions