-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Description
Problem
LSP tools (lsp_diagnostics, lsp_goto_definition, etc.) are blocked on Windows with the following error:
Error: LSP server cannot be started safely.
⚠️ Windows + Bun v1.3.5 detected: Known segmentation fault bug with LSP.
This causes crashes when using LSP tools (lsp_diagnostics, lsp_goto_definition, etc.).
SOLUTION: Upgrade to Bun v1.3.6 or later:
powershell -c "irm bun.sh/install.ps1|iex"
WORKAROUND: Use WSL instead of native Windows.
See: https://github.com/oven-sh/bun/issues/25798
Environment
- OS: Windows 10/11 x64
- System Bun version: 1.3.8 (latest)
- oh-my-opencode version: 3.2.3
- opencode-ai version: 1.1.53
Root Cause
The oh-my-opencode-windows-x64 package contains a precompiled binary (oh-my-opencode.exe) that was built with Bun 1.3.5. This binary embeds the Bun runtime, so Bun.version returns 1.3.5 regardless of the system's installed Bun version.
The checkWindowsBunVersion() function in dist/index.js correctly checks for Bun < 1.3.6, but since the embedded Bun version is 1.3.5, the check always fails on Windows.
Investigation
-
System Bun is correctly installed and updated:
$ bun --version 1.3.8 -
The version check logic is correct:
// This logic is fine if (major < 1 || major === 1 && minor < 3 || major === 1 && minor === 3 && patch < 6)
-
But the precompiled
.exehas Bun 1.3.5 embedded, soBun.versionreturns1.3.5at runtime. -
Modifying
dist/index.jshas no effect because the.exeis a self-contained binary with all code bundled inside.
Suggested Fix
Rebuild and publish oh-my-opencode-windows-x64 using Bun >= 1.3.6.
Workaround
Currently, the only workarounds are:
- Use WSL instead of native Windows
- Wait for a new release built with Bun >= 1.3.6