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

Open
opened 2026-02-16 18:09:45 -05:00 by yindo · 3 comments
Owner

Originally created by @syj925 on GitHub (Feb 2, 2026).

Originally assigned to: @thdxr on GitHub.

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

Originally created by @syj925 on GitHub (Feb 2, 2026). Originally assigned to: @thdxr on GitHub. ### 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
yindo added the windowsbugperf labels 2026-02-16 18:09:45 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Feb 2, 2026):

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

  • #11648: [Windows] Upgrade embedded Bun runtime from v1.3.5 — LSP broken due to spawn segfault - Directly addresses the same issue with identical root cause
  • #11619: LSP server cannot be started safely - Reports the same error message and Windows Bun 1.3.5 detection issue
  • #11404: Suggestion to Update the BUILT-IN BUN VERSION in the Binary Package to Fix OpenCode Issues Caused by Bun bugs - Requests the exact same fix for the built-in Bun version
  • #8365: I have upgraded Bun to version 1.3.6, so why does the error message still show the Bun version as 1.3.5? - Shows the same symptom where system Bun is newer but OpenCode reports the old embedded version
  • #11339: Segmentation fault (0xFFFFFFFFFFFFFFFF) in Bun 1.3.5 during Planner execution on Windows - Related Windows Bun 1.3.5 segmentation fault issue

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

@github-actions[bot] commented on GitHub (Feb 2, 2026): This issue might be a duplicate of existing issues. Please check: - #11648: [Windows] Upgrade embedded Bun runtime from v1.3.5 — LSP broken due to spawn segfault - Directly addresses the same issue with identical root cause - #11619: LSP server cannot be started safely - Reports the same error message and Windows Bun 1.3.5 detection issue - #11404: Suggestion to Update the BUILT-IN BUN VERSION in the Binary Package to Fix OpenCode Issues Caused by Bun bugs - Requests the exact same fix for the built-in Bun version - #8365: I have upgraded Bun to version 1.3.6, so why does the error message still show the Bun version as 1.3.5? - Shows the same symptom where system Bun is newer but OpenCode reports the old embedded version - #11339: Segmentation fault (0xFFFFFFFFFFFFFFFF) in Bun 1.3.5 during Planner execution on Windows - Related Windows Bun 1.3.5 segmentation fault issue Feel free to ignore if these don't address your specific case.
Author
Owner

@Happy-DJ commented on GitHub (Feb 5, 2026):

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

@Happy-DJ commented on GitHub (Feb 5, 2026): +1 每沟通一个问题就崩溃一次,受不了了。
Author
Owner

@EricSolshkov commented on GitHub (Feb 5, 2026):

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.

@EricSolshkov commented on GitHub (Feb 5, 2026): 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.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#8352