Skip to content

Windows segfault: Bun 1.3.9 crash during active multi-tool session (no graceful shutdown) #14204

Closed as not planned

Description

@TiidSizaan

Summary

OpenCode process crashes on Windows with a Bun segmentation fault during an active session that had multiple tool calls in flight.

This appears to be a Bun runtime crash, but it is surfaced through OpenCode and causes abrupt session loss.

Environment

  • OpenCode CLI: 1.2.6
  • Bundled Bun: 1.3.9 (cf6cdbbb)
  • OS: Windows 11 x64
  • CPU features: sse42 avx avx2 avx512

Crash Signature

  • panic(thread ...): Segmentation fault at address 0xFFFFFFFFFFFFFFF8
  • Also reported as: Segmentation fault at address 0xFFFFFFFFFFFFFFFF
  • Crash report includes:
    • WebCore::JSBlobConstructor::construct
    • simdutf ... encode_base64_impl
    • WebCore::JSRequestConstructor::call
    • oh no: Bun has crashed. This indicates a bug in Bun, not your code.

Bun report URL:
https://bun.report/1.3.9/wa1cf6cdbbmxGz+3/9/D4j0/fksz/f8y+9oB68lu1B0oku1B035t1Bmxut1B64wq1Bs/vq1Bi954wBm4x/xB8nx/xBsg1p5By0zp5B8279Uw5vrTs1n2wBsx/wwB6mt+d2ozypBA2DD

What Happened Immediately Before Crash

  • OpenCode loaded plugins including oh-my-opencode.
  • It auto-updated oh-my-opencode from 3.7.3 to 3.7.4 via bun add ... oh-my-opencode@latest.
  • A new session started.
  • The active assistant turn launched multiple tool calls (search/session search/glob/grep/AST-grep + background subagents).
  • Process crashed around ~180s elapsed.

Observable Impact

  • Server log for that run ends abruptly mid-request (no clean shutdown sequence).
  • DB state for the crashed session shows multiple tool parts stuck in running state (10), indicating abrupt termination while tools were still executing.

Why This Is Filed Here

I agree the segfault root cause is likely Bun, but OpenCode is the runtime host here. Useful OpenCode-side mitigations could include:

  1. Optional safety mode for Windows to force baseline binary / disable risky paths.
  2. Guardrail for plugin auto-update during active startup/session.
  3. Recovery marker when process exits while tool states are still running.
  4. Better crash-handling UX with resumable context and one-click issue export.

Repro (high-level)

  1. Windows 11 x64, OpenCode 1.2.6 with bundled Bun 1.3.9.
  2. Enable plugin set including oh-my-opencode.
  3. Start a session and run a high-concurrency analysis prompt (parallel tool + background agent fan-out).
  4. After a few minutes, process may segfault with the Bun signature above.

If needed, I can provide additional redacted structured artifacts (session/tool state timeline) without personal paths.

Activity

  1. added
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on Feb 18, 2026
  2. github-actions commented on Feb 18, 2026

    @github-actions
    Contributor

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

    If your issue is already addressed by one of these, please consider closing this one or adding any new details there.

  3. Hona commented on Feb 18, 2026

    @Hona
    Member

    can you try fully uninstalling omo?
    then reinstalling it?

    one user with segfaults reported this was the fix

  4. Hona commented on Feb 18, 2026

    @Hona
    Member

    I am now suddently getting segfaults lol... hopefully bun 1.3.10 fixes this

  5. xirain commented on Feb 25, 2026

    @xirain

    not related with version of omo. it's my local folder, change to another folder, can open opencode successfully.

  6. abakumov-v commented on Feb 25, 2026

    @abakumov-v

    can you try fully uninstalling omo? then reinstalling it?

    one user with segfaults reported this was the fix

    I tried to fully re-install opencode + cleaning ./.config/opencode and ./.local/share/ folder for my windows user profile's folder
    then I re-cloned git repo (thought that it might be a problem after my laptop went turned off accidentially)

    nothing helped

    I have bun installed on my windows 11 - 1.2.15
    but got same error about bun 1.3.10 canary ...
    Image

    Small update - for another repo it works fine - so looks like it's a repo-specific problem
    I tried to delete .opencode folder in the repo, and error still happens
    opencode = 1.2.14

  7. abakumov-v commented on Feb 25, 2026

    @abakumov-v

    okay, I found the reason why it's failing only for one repo on my local - .env file 😢
    even though it was added to .opencodeignore 🫤

    but it worked before...

  8. abakumov-v commented on Feb 25, 2026

    @abakumov-v

    this is also interensting bug - it shows injecting env (0) from .env right in the input area:

    Image
  9. abakumov-v commented on Feb 25, 2026

    @abakumov-v

    found this same issue but more detailed - #15015

  10. github-actions commented on Apr 27, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 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

coreAnything pertaining to core functionality of the application (opencode server stuff)windows

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions