Skip to content

[Windows] OpenCode binary is compiled with Bun 1.3.5, causing LSP crashes/blocks despite system Bun 1.3.8 #11824

Closed

Description

@syj925

Description

I am running OpenCode on Windows 11. Although I have upgraded my system Bun version to 1.3.8 (which fixes the known Windows segmentation faults), OpenCode still detects the runtime environment as Bun 1.3.5 and blocks/crashes when using LSP tools.
It appears the opencode-windows-x64 binary distributed in the npm/bun package is a standalone executable compiled/bundled with Bun 1.3.5. This prevents Windows users from using LSP features even if they have fixed the Bun version on their system.
Error Message:
Error: Error: LSP server cannot be started safely.
⚠️ Windows + Bun v1.3.5 detected: Known segmentation fault bug with LSP.
Analysis:

  1. System Bun version is 1.3.8 (bun --version).
  2. Installed OpenCode v1.1.48 via bun install -g opencode-ai.
  3. The executed binary (C:\Users....bun\bin\opencode.exe) seems to be locked to the Bun version it was built with (1.3.5).
  4. Bun 1.3.5 has critical bugs on Windows causing segmentation faults with LSP usage.
    Request:
    Please rebuild and release the Windows binary using Bun >= 1.3.6 (preferably 1.3.8) to resolve the segmentation fault issues and allow LSP to work on Windows.

Plugins

oh-my-opencode, opencode-antigravity-auth

OpenCode version

1.1.48

Steps to reproduce

  1. On Windows 11, install Bun v1.3.8 (powershell -c "irm bun.sh/install.ps1|iex").
  2. Install OpenCode: bun install -g opencode-ai (or via npm).
  3. Verify system bun is new: bun --version -> 1.3.8.
  4. Start OpenCode: opencode (or bunx opencode).
  5. Trigger any LSP action (e.g., lsp_diagnostics).
  6. Result: The action fails with the "Windows + Bun v1.3.5 detected" error, indicating the internal runtime is still old.

Screenshot and/or share link

No response

Operating System

windows 11

Terminal

power shell

Activity

  1. github-actions commented on Feb 2, 2026

    @github-actions
    Contributor

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

    Feel free to ignore if these don't address your specific case.

  2. added
    perfIndicates a performance issue or need for optimization
    on Feb 2, 2026
  3. Happy-DJ commented on Feb 5, 2026

    @Happy-DJ

    +1 每沟通一个问题就崩溃一次,受不了了。

  4. EricSolshkov commented on Feb 5, 2026

    @EricSolshkov

    You may try asking opencode to build a local version according to the build instructions in this repo (somehow like bootstrap). Since you are using a LLM tool to work, why not asking it to make a local build to save you from known bun crushes? This operation could be done with ONLY LLM and some simple instructions.

    After clone, you re-specify the dependency of bun from 1.3.5 to 1.3.6(minimum change), and rebuild the cli and desktop target, and replace the original executables in PATH.(Don't forget to backup them and your previous sessions.)

    PS 1. Before build operations, you MAY need to deploy some dependencies of build tool chain such as Rust, node, Tauri, etc. Since I am using Windows10 + MSVC, Rust + NodeJs + Tauri works for me.

    PS 2. Before build operations, you MAY specify the version code for target exactly identical to the opencode you are using now. Otherwise your previous sessions may not appear.

    This works for me, however, it is not guaranteed to be stable and safe, I am doing this ONLY BECAUSE an urgent need for LSPs. I am AWARE of that unstable build may corrupt my previous sessions.

  5. github-actions commented on Apr 7, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingperfIndicates a performance issue or need for optimizationwindows

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions