Skip to content

fix(desktop): health check fails during server startup causing IDE instability #24142

@herjarsa

Description

@herjarsa

Pre-flight Checks

  • I have searched existing issues and this is not a duplicate
  • I understand this issue needs status:approved before a PR can be opened

Bug Description

The desktop app health check does not retry when the local server sidecar is still initializing. This causes:

  1. MCP local connections to repeatedly disconnect and reconnect
  2. IDE freezes when switching between sessions
  3. Server marked as unhealthy even though it is still starting up

Steps to Reproduce

  1. Open OpenCode desktop app
  2. Server sidecar starts but health check fires immediately
  3. Health check fails because server is not ready yet
  4. Desktop app shows server as down
  5. IDE becomes unresponsive or MCPs disconnect

Expected Behavior

Health check should retry with exponential backoff until the server is ready, up to a reasonable timeout.

Actual Behavior

Health check fails instantly on first attempt, causing cascading instability.

Operating System

Windows

Agent / Client

OpenCode Desktop

Shell

PowerShell

Relevant Logs

Server stdout shows "sidecar process spawned, waiting for server to become healthy" followed immediately by health check error without retries.

Additional Context

Related PR: #24138 which implements retry logic.

Metadata

Metadata

Assignees

Labels

webRelates to opencode on web / desktopwindows

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions