Skip to content

LSP tools blocked on Windows due to embedded Bun 1.3.5 in precompiled binary #1558

@elevenkongqian

Description

@elevenkongqian

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

  1. System Bun is correctly installed and updated:

    $ bun --version
    1.3.8
    
  2. The version check logic is correct:

    // This logic is fine
    if (major < 1 || major === 1 && minor < 3 || major === 1 && minor === 3 && patch < 6)
  3. But the precompiled .exe has Bun 1.3.5 embedded, so Bun.version returns 1.3.5 at runtime.

  4. Modifying dist/index.js has no effect because the .exe is 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

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions