Skip to content

[Windows/WSL] Desktop crashes "Session not found" on restart when WSL server is running but not set as default + No fallback when default server is unavailable #36016

Description

@Meepo268

Description

Bug 1: Desktop crashes on restart when WSL server is running but not set as default

Describe the bug
Environment: Windows + WSL2

  • Windows Desktop connects to WSL opencode server
  • WSL server is NOT set as default server in Desktop settings
  • Close Desktop (WSL server is still running)
  • Reopen Desktop → crashes with "Session not found: ses_..." error page

Expected behavior
Desktop should handle invalid/expired session IDs gracefully and fall back to the workspace view instead of crashing.

Related Issue
References #25131 - session ID is not scoped per server origin, causing cross-server session ID reuse on restart.

Screenshots
(No screenshots available for now)


Bug 2: When WSL is set as default server and WSL is not running, Desktop has no fallback option

Describe the bug

  • Set WSL as default server in Desktop's server settings
  • Close WSL (not running)
  • Open Desktop → only shows WSL server in the server list, NO local server option
  • Desktop keeps retrying "Connecting..." endlessly
  • Desktop cannot be used independently until WSL is started

Expected behavior
When the default server is unavailable, Desktop should either:

  1. Show a dialog: "WSL server unavailable, fall back to local server?"
  2. Always keep the local server option visible in the server list (even if grayed out)
  3. Or automatically fall back to the local server

Related Discussion
#7371 (feature request for default server URL with fallback, never implemented)


Environment:

  • OpenCode Desktop version: v1.17.15
  • Windows version: Windows 11 23H2
  • WSL2 with Ubuntu
  • WSL server command: opencode serve

Plugins

No plugins

OpenCode version

v1.17.15

Steps to reproduce

Bug 1:

  1. Connect Windows Desktop to a WSL opencode server
  2. Add the WSL server in Settings → Servers
  3. Do NOT set it as the default server
  4. Use normally, then close Desktop (keep the WSL server running)
  5. Reopen Desktop → crash page with "Session not found: ses_..."

Bug 2:

  1. Set the WSL server as the default server in Settings → Servers
  2. Stop WSL (make it unavailable)
  3. Open Desktop → server list only shows WSL, no local server option
  4. Page keeps showing "Connecting..." indefinitely, Desktop is unusable

Screenshot and/or share link

No response

Operating System

Windows 11 25H2

Terminal

No response

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

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