Skip to content

[Bug] LSP permanently blocked on Windows: opencode embeds Bun v1.3.5, users cannot upgrade #1366

Closed

Description

@EnvyGithub

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

  1. opencode ships a standalone executable — opencode.exe is built with bun build --compile, which bundles Bun v1.3.5 into the binary
  2. System Bun is irrelevant — even if the user upgrades system Bun to v1.3.8, opencode.exe still uses its embedded v1.3.5
  3. oh-my-opencode checks Bun.version — which reads the embedded version (always 1.3.5), not the system version
  4. 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

Proposal

Since the embedded Bun version is outside user control, please consider one of:

  1. Add a config option to bypass the check (e.g., lsp.forceStartOnWindows: true) — let users accept the crash risk
  2. 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
  3. 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

Activity

  1. 15195999826 commented on Feb 2, 2026

    @15195999826

    I don't know when OpenCode will update the bun version, but directly prohibiting me from using LSP is really upsetting.

  2. seventhrex19-arch commented on Feb 3, 2026

    @seventhrex19-arch

    seem

  3. luhaoting commented on Feb 5, 2026

    @luhaoting

    I upgraded multiple versions of Bun for this issue. Thanks for your answer.

  4. code-yeongyu commented on Feb 8, 2026

    @code-yeongyu
    Owner

    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_process for LSP process spawning on Windows, bypassing the Bun spawn segfault entirely:

    // Bun spawn segfaults on Windows (oven-sh/bun#25798) — unfixed as of v1.3.8+
    function shouldUseNodeSpawn(): boolean {
      return process.platform === "win32"
    }

    Key changes (commit 955ce710):

    Resolution

    Update to oh-my-opencode v3.3.0+. LSP tools will work on Windows regardless of the embedded Bun version in opencode.exe.

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

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