You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Windows: embedded Bun 1.3.14 predates oven-sh/bun#35083 — opencode.exe segfaults whenever nProtect GameGuard (Helldivers 2) is running #44513
opencode.exe dies with a Bun panic whenever nProtect GameGuard is running — i.e. any time Helldivers 2 (or another GameGuard title) is open. GameGuard's npggNT64.des injects into running processes and raises a first-chance access violation inside its own __try/__except. Bun's vectored exception handler claims that fault before SEH can run, and treats it as fatal. An otherwise-idle opencode session survives indefinitely, then dies seconds after the game launches.
The crash signature is documented upstream in oven-sh/bun#34055 — Segmentation fault at address 0x3C, with npggNT64.des / USER32.dll in the stack.
This is already fixed in Bun.oven-sh/bun#35083 ("let foreign first-chance AVs reach SEH via JSC unwind info") merged 2026-07-23; the VEH now only claims faults originating inside Bun's own image. It first shipped in Bun 1.4.0 (2026-08-20).
OpenCode hasn't picked it up:
package.json on main pins "packageManager": "bun@1.3.14" — 1.3.14 was released 2026-05-13, two months before the fix.
Byte-scanning the shipped opencode.exe from 1.18.21 (published 2026-08-21, a day after Bun 1.4.0) finds only Bun v1.3.14; no 1.4 string is present.
The reason this needs fixing here rather than by the user: bun upgrade updates the standalone bun binary, not the runtime compiled into opencode.exe. There is no user-side workaround short of running opencode from source under a newer Bun, or moving to WSL2. It needs a rebuild against Bun >= 1.4.0.
If the fix in oven-sh/bun#35083 (Bun 1.4.0) resolves the underlying exception-handler issue, it may address those reports as well. Cross-linking for maintainer visibility.
with bun-version-file: package.json for the non-baseline path. packages/opencode/script/build.ts then compiles via Bun.build({ compile: { target: "bun-windows-x64", ... } }), so the embedded runtime is whatever version of Bun runs the build.
So bumping "packageManager": "bun@1.3.14" → "bun@1.4.0" should be sufficient to propagate the fix to every published target — no code change. bun-windows-x64.zip and bun-windows-x64-baseline.zip both exist on the bun-v1.4.0 release, so the baseline path resolves too. CONTRIBUTING already states "Requirements: Bun 1.3+", so 1.4.0 is within the supported range.
Worth noting the beta and dev branches also still pin bun@1.3.14, so there's currently no channel where users can pick this up.
Additional reproduction: Yan Kernel (same embedded Bun 1.3.14, same crash)
This is not specific to opencode — any product built on this kernel reproduces it. Confirmed on Yan Agent / Yan Kernel (Windows desktop), which ships the same opencode.exe runtime.
Evidence from this machine:
Kernel binary: %APPDATA%\yan-agent\YanData\opencode-runtime\bin\all-file-tools-v1-344eedb423ef3c4d\opencode.exe, ProductVersion = 1.3.14 (embedded Bun 1.3.14).
Crash log (YanData\yan-core\events.jsonl):
26 × panic(thread ...): Segmentation fault at address 0x3C
Trigger: while nProtect GameGuard is running (local GameMon.des / GameMon64.des active). The kernel dies at startup, in bursts; recovers as soon as the game exits.
Same root cause as this issue: embedded Bun 1.3.14 predates oven-sh/bun#35083 (first shipped in Bun 1.4.0). The fix path is the same — bump the pinned bun@1.3.14 to >=1.4.0 and rebuild the compiled binary. Any downstream consumer embedding this kernel is affected, so it would help to note that in the fix.
Environment: Windows 11 26100, x64; kernel opencode 1.18.11 / Bun 1.3.14.
Thanks for the report! OpenCode 2.0 is now out and development is focused on V2, so we're closing issues filed against OpenCode 1. Please upgrade (opencode upgrade --major, details: https://anoma.ly/notes/opencode-2-0), and if this is still relevant on 2.0, reopen this issue or open a new one with your 2.0 version.
Activity
github-actions commentedon Aug 23, 2026
This issue might be a duplicate of or related to existing issues. Please check:
Bun v1.3.14runtime — overlapping root cause (outdated bundled Bun on Windows), though the trigger differsIf the fix in oven-sh/bun#35083 (Bun 1.4.0) resolves the underlying exception-handler issue, it may address those reports as well. Cross-linking for maintainer visibility.
nyecov commentedon Aug 23, 2026
Tracing the build, the fix looks like a one-line change.
.github/actions/setup-bunderives the toolchain version solely frompackage.json:with
bun-version-file: package.jsonfor the non-baseline path.packages/opencode/script/build.tsthen compiles viaBun.build({ compile: { target: "bun-windows-x64", ... } }), so the embedded runtime is whatever version of Bun runs the build.So bumping
"packageManager": "bun@1.3.14"→"bun@1.4.0"should be sufficient to propagate the fix to every published target — no code change.bun-windows-x64.zipandbun-windows-x64-baseline.zipboth exist on thebun-v1.4.0release, so the baseline path resolves too. CONTRIBUTING already states "Requirements: Bun 1.3+", so 1.4.0 is within the supported range.Worth noting the
betaanddevbranches also still pinbun@1.3.14, so there's currently no channel where users can pick this up.cwx07426 commentedon Oct 10, 2026
Additional reproduction: Yan Kernel (same embedded Bun 1.3.14, same crash)
This is not specific to opencode — any product built on this kernel reproduces it. Confirmed on Yan Agent / Yan Kernel (Windows desktop), which ships the same
opencode.exeruntime.Evidence from this machine:
%APPDATA%\yan-agent\YanData\opencode-runtime\bin\all-file-tools-v1-344eedb423ef3c4d\opencode.exe,ProductVersion = 1.3.14(embedded Bun 1.3.14).YanData\yan-core\events.jsonl):26×panic(thread ...): Segmentation fault at address 0x3C31×OpenCode exited during startup (3)npggNT64.des … USER32.dll … npggNT64.des— identical to Segfault at 0x3C — nProtect GameGuard (npggNT64.des) injection kills any Bun process on Windows 11 oven-sh/bun#34055.GameMon.des/GameMon64.desactive). The kernel dies at startup, in bursts; recovers as soon as the game exits.Same root cause as this issue: embedded Bun 1.3.14 predates oven-sh/bun#35083 (first shipped in Bun 1.4.0). The fix path is the same — bump the pinned
bun@1.3.14to>=1.4.0and rebuild the compiled binary. Any downstream consumer embedding this kernel is affected, so it would help to note that in the fix.Environment: Windows 11 26100, x64; kernel opencode 1.18.11 / Bun 1.3.14.
thdxr commentedon Oct 11, 2026
Thanks for the report! OpenCode 2.0 is now out and development is focused on V2, so we're closing issues filed against OpenCode 1. Please upgrade (
opencode upgrade --major, details: https://anoma.ly/notes/opencode-2-0), and if this is still relevant on 2.0, reopen this issue or open a new one with your 2.0 version.— from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊