Skip to content

[Bug]: Bun crash (Segmentation Fault) caused by lsp_diagnostics missing typescript-language-server on Windows #1291

@Brisbanehuang

Description

@Brisbanehuang

Prerequisites

  • I will write this issue in English (see our Language Policy)
  • I have searched existing issues to avoid duplicates
  • I am using the latest version of oh-my-opencode
  • I have read the documentation

Bug Description

On Windows, when lsp_diagnostics attempts to spawn typescript-language-server and fails (ENOENT), it triggers a catastrophic segmentation fault in the underlying Bun runtime, causing the entire process to crash.

Image

Steps to Reproduce

  1. Run OpenCode on Windows x64.
  2. Execute a task involving lsp_diagnostics (e.g., verifying a React/TS task).
  3. The system attempts to call typescript-language-server.
  4. Observe the crash immediately after the ENOENT error.

Expected Behavior

The agent should handle the "executable not found" error gracefully, or the runtime should throw a JS error, rather than panicking with a segmentation fault.

Actual Behavior

The process crashes with a Bun panic.

Error Logs

Error: Error: ENOENT: no such file or directory, uv_spawn 'typescript-language-server'

panic(thread 34044): Segmentation fault at address 0x32A081E01A0
oh no: Bun has crashed. This indicates a bug in Bun, not your code.
"undici" "node:v8" "node:http2" "node:diagnostics_channel" "node:dgram"

Environment

  • OS: Windows x64
  • Bun: v1.3.5 (1e86cebd)
  • OpenCode: 1.1.45
  • oh-my-opencode: 3.1.9

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