Repository navigation
Closed
Description
Description
The LSP safety check in oh-my-opencode (checkWindowsBunVersion()) blocks LSP startup when Bun < 1.3.6 is detected. However, the real blocker is that opencode embeds Bun v1.3.5 in its standalone executable (opencode.exe), and users cannot upgrade the embedded Bun runtime.
Root Cause Chain
- opencode ships a standalone executable —
opencode.exeis built withbun build --compile, which bundles Bun v1.3.5 into the binary - System Bun is irrelevant — even if the user upgrades system Bun to v1.3.8,
opencode.exestill uses its embedded v1.3.5 - oh-my-opencode checks
Bun.version— which reads the embedded version (always1.3.5), not the system version - LSP is permanently blocked on Windows — no user action can resolve this
Evidence
# opencode.exe binary contains hardcoded Bun v1.3.5
$ strings opencode.exe | grep "Bun v"
Bun v1.3.5
Bun v1.3.5
# System Bun version is irrelevant
$ bun -v
1.3.8 # doesn't matter
# oh-my-opencode reads embedded version
Bun.version → "1.3.5" # always, regardless of system Bun
The Safety Check
// oh-my-opencode/dist/index.js line ~30376
function checkWindowsBunVersion() {
if (process.platform !== "win32") return null;
const version = Bun.version; // ← reads embedded 1.3.5, not system Bun
const [major, minor, patch] = version.split(".").map(v => parseInt(v.split("-")[0], 10));
if (major === 1 && minor === 3 && patch < 6) {
return { isAffected: true, message: "..." };
}
return null;
}Additional Context
- Bun v1.3.6/7/8 release notes show no explicit fix for the Windows spawn segfault
- Users on v1.3.7 still report crashes: Bun Crash in windows cmd oven-sh/bun#26530
- The upstream Bun issue (Segmentation fault at address 0x0 on Windows x64 baseline in Bun v1.3.5 during opencode-ai execution oven-sh/bun#25798) has no official response or fix timeline
- All Windows opencode users with oh-my-opencode are affected — LSP is completely unusable
Proposal
Since the embedded Bun version is outside user control, please consider one of:
- Add a config option to bypass the check (e.g.,
lsp.forceStartOnWindows: true) — let users accept the crash risk - Reconsider the version threshold — if v1.3.6+ also crashes, the check doesn't protect users anyway; it just blocks those who might not crash
- Advocate to opencode team to upgrade their embedded Bun version — this is the actual fix
Environment
- opencode: v1.1.48 (embedded Bun v1.3.5)
- oh-my-opencode: latest
- OS: Windows 11 x64
- System Bun: v1.3.8 (irrelevant)
Related Issues
- Segmentation fault at address 0x0 on Windows x64 baseline in Bun v1.3.5 during opencode-ai execution oven-sh/bun#25798 — upstream Bun segfault (Open, no response)
- TypeScript LSP crashes with Bun segmentation fault on Windows 11 anomalyco/opencode#7318 — LSP crash on Windows (Open)
- [Bug][v3.0.0-beta.15]: Bun crashed when using LSP(lsp_diagnostics) on Windows #1047 — Bun crashed when using LSP on Windows (Open)
- [Bug]: An error occurred while waiting for /start-work. errormsg:Bun v1.3.5 (1e86cebd) Windows x64 (baseline) panic(thread 31200): Segmentation fault at address 0x5A52A1E0140 oh no: Bun has crashed. This indicates a bug in Bun, not your code. #1325 — Segfault during /start-work on Windows (Open)
Reacted by Lomo
Metadata
Metadata
Assignees
Labels
No labels
Activity
15195999826 commentedon Feb 2, 2026
I don't know when OpenCode will update the bun version, but directly prohibiting me from using LSP is really upsetting.
seventhrex19-arch commentedon Feb 3, 2026
seem
luhaoting commentedon Feb 5, 2026
I upgraded multiple versions of Bun for this issue. Thanks for your answer.
code-yeongyu commentedon Feb 8, 2026
Update
Fixed in v3.3.0+
The hard version check (
checkWindowsBunVersion()) that blocked LSP on Windows has been completely removed as of PR #1510 (Feb 5, 2026).How it was fixed
Instead of checking the Bun version and blocking, oh-my-opencode now automatically uses Node.js
child_processfor LSP process spawning on Windows, bypassing the Bunspawnsegfault entirely:Key changes (commit
955ce710):windowsHide: trueandshell: truefor robust process managementResolution
Update to oh-my-opencode v3.3.0+. LSP tools will work on Windows regardless of the embedded Bun version in
opencode.exe.fix(lsp): reset safety block on server restart to prevent permanent b…
Merge pull request #1657 from code-yeongyu/fix-1366-lsp-unblock