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
OpenCode v1.18.4 crashes with Bun libpas heap assertion and illegal instruction error on Windows #38721
When running OpenCode v1.18.4 on Windows 11, Open Code crashes with a Bun panic triggered by libpas heap assertion failure and illegal instruction exceptions. The crash consistently occurs during workflows that generate long AI output JSON strings with multiple workers enabled. Massive memory usage spikes and extreme page faults precede every crash.
This appears to be a runtime-level bug in the embedded Windows standalone Bun build rather than a user configuration or project code issue.
Environment
OS: Windows 11 x64
OpenCode version with crash: 1.18.4
Launch method: Run opencode.exe via VS Code terminal
Global standalone Bun installed separately: No
Embedded Bun version from crash log: Bun v1.3.14 (0d9b296a)
Architecture: windows x64 baseline / windows x86_64_baseline [StandaloneExecutable]
Runtime mode: standalone_executable
CPU Features: sse42, avx, avx2 supported
Crash Output Snippet
Bun v1.3.14 (0d9b296a) Windows x64 (baseline)
CPU:sse42 avx avx2
Args: "C:\Users\DELL\.bun\..\node_modules\opencode-ai\bin\opencode.exe" "--user-agent=opencode/1.18.4" "--use-system-ca" "---"
panic(thread 26236): Illegal instruction at address0x7FF62B5CA852
oh no:Bun has crashed.This indicates a bug inBun, not your code.
Crash stack trace root cause: pas_assertion_failed_inline inside libpas bmalloc heap allocator
Key resource metrics before crash:
RSS: 7.59GB | Peak memory:10.22GB
Virtual memory commit: 27.20GB
Total page faults: over 1.2 billion
Long runtime elapsed before crash: ~5.7 hours
Workers spawned: 2
What I was doing
I launched OpenCode inside a local project through the VS Code terminal.
The crash reproduces reliably under heavy AI workflows with the following characteristics:
Multiple parallel sub-agent enabled
Large AI model outputs requiring construction of extremely long JSON strings
Frequent string buffer resizing and JSON serialization via StringBuilder
Long continuous runtime
The crash is an abrupt native process kill, and no regular application-level errors show up in OpenCode logs before the Bun panic. Standard model API errors like timeouts or quota limits appear separately in logs and do not trigger this fatal heap crash on their own.
This matches the libpas/bmalloc heap assertion failure signature from the original report. The bundled Bun 1.3.14 is unchanged in 1.18.18. Any ETA on bumping the embedded Bun runtime on Windows?
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
shiping430 commentedon Aug 19, 2026
Same crash here, still reproducible on the latest stable v1.18.18 (npm global install, Windows 10):
Crash report link: https://bun.report/1.3.14/ea18d9b296m/GugogDk18u+CogkvtDq1+koDg9lz+Ciumz+C+6g+uC6m771B6m67uC8747uCurp
This matches the libpas/bmalloc heap assertion failure signature from the original report. The bundled Bun 1.3.14 is unchanged in 1.18.18. Any ETA on bumping the embedded Bun runtime on Windows?
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 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊