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 1.1.59 crashes immediately on chat (Bun AVX crash) #13282
After upgrading to OpenCode 1.1.59, the application crashes immediately as soon as I start a conversation.
It was working normally before the upgrade. Now, whenever I send a message, OpenCode crashes instantly.
My CPU supports AVX and AVX2 (Xeon W-2123, Skylake architecture), but Bun reports "CPU lacks AVX support".
I installed Bun separately on the same machine:
bun --version
1.3.9
The standalone Bun installation works correctly and does NOT crash.
This suggests that the issue is specific to the Bun binary bundled with OpenCode 1.1.59, rather than my CPU or Windows environment.
Environment
OS:
Windows 10 Enterprise LTSC 1809
OS Build: 17763.2989
Installed: 2021/05/06
Node version:
v24.13.0
OpenCode version:
1.1.59 (installed via Scoop)
Crash Output
Bun v1.3.8 (b64edcb4) Windows x64
CPU lacks AVX support. Please consider upgrading to a newer CPU.
panic(thread 12254): Segmentation fault at address 0xA
oh no: Bun has crashed. This indicates a bug in Bun, not your code.
To send a redacted crash report to Bun's team,
please file a GitHub issue using the link below:
[https://bun.report/1.3.8/](https://bun.report/1.3.8/)...
These issues all stem from the same root cause: OpenCode binaries are compiled with AVX/AVX2 instructions that aren't supported on older CPUs, causing immediate crashes. Your environment (Windows 10 LTSC with an older CPU architecture) is affected by the same bug.
I have a similar challenge. Bun.exe uses all memory and my PC freeze completely. I sometime get "Out of memory" exception in OpenCode desktop. I tried to take a screenshot, but it is completely impossible - since my PC locks up completely.
My issue is an immediate AVX crash, not high memory usage or system freeze.
Standalone Bun works fine for me, so the problem appears specific to OpenCode’s bundled runtime.
How many of you are running opencode raw and hit this issue?你们当中有多少人使用 opencode raw 版本并遇到过这个问题?
Like without custom plugins or tools就像没有自定义插件或工具一样
Raw version, 1.2.5 and 1.2.6 still (tried downloading via curl and npm)
# opencode
============================================================
Bun v1.3.9 (cf6cdbbb) Linux x64 (baseline)
Linux Kernel v6.8.0 | glibc v2.39
Args: "/root/.nvm/versions/node/v24.12.0/lib/node_modules/opencode-ai/node_modules/opencode-linux-x64-baseline/bin/opencode" "--user-agent=opencode/1.2.6" "--use-system-ca" "--"
Features: jsc no_avx2 no_avx standalone_executable
Builtins: "bun:main"
Elapsed: 54365ms | User: 30229ms | Sys: 21599ms
RSS: 15.96GB | Peak: 8.66GB | Commit: 15.96GB | Faults: 29 | Machine: 16.73GB
CPU lacks AVX support. Please consider upgrading to a newer CPU.
panic(main thread): Segmentation fault at address 0x2C8A8000000
oh no: Bun has crashed. This indicates a bug in Bun, not your code.
To send a redacted crash report to Bun's team,
please file a GitHub issue using the link below:
This confirms the issue affects modern CPUs with full AVX2 support, not just older/limited hardware.
Additional Data Point: i9-14900HX with AVX2 Still Crashes on Windows 11
I'm experiencing the same crash on a modern, high-end CPU with full AVX2 support, confirming this is a Bun packaging bug rather than a CPU limitation.
Environment
CPU: Intel Core i9-14900HX
Architecture: Raptor Lake (2023)
AVX Support: Confirmed present (SSE4.2, AVX, AVX2 all detected)
Verification:wmic cpu get caption shows Intel64 Family 6 Model 183
OS: Windows 11 OpenCode Version: 1.2.6 Installation Method: npm (npm install -g opencode-ai) Bun Version: 1.3.9 (cf6cdbbb)
Crash Output
============================================================
Bun v1.3.9 (cf6cdbbb) Windows x64
Windows v.win11_dt
CPU: sse42 avx avx2
Args: "C:\Users\username\AppData\Roaming\npm\node_modules\opencode-ai\node_modules\opencode-windows-x64\bin\opencode.exe" "--version"
Elapsed: 1ms | User: 0ms | Sys: 15ms
RSS: 18.50MB | Peak: 18.50MB | Commit: 55.67MB | Faults: 4685
panic(main thread): Segmentation fault at address 0x7FF7BF55795D
oh no: Bun has crashed. This indicates a bug in Bun, not your code.
Key Observations
Bun correctly detects AVX support (CPU: sse42 avx avx2) but still crashes
Both builds installed: The npm package correctly installed both opencode-windows-x64 and opencode-windows-x64-baseline in node_modules, but npm resolves to the non-baseline version by default
Baseline version exists but not used: Despite the baseline build being available as an optional dependency, the package manager doesn't fallback to it
Reproduction Steps
# Install via npm
npm install -g opencode-ai
# Verify both builds present
dir C:\Users\<USER>\AppData\Roaming\npm\node_modules\opencode-ai\node_modules | findstr opencode-windows
# Outputs:# opencode-windows-x64 <- Used by default (crashes)# opencode-windows-x64-baseline <- Available but not used# Any opencode command crashes
opencode --version
opencode --continue
Suggested Fix
The npm package should either:
Detect CPU at install time and choose the appropriate build, OR
Default to baseline on Windows since the non-baseline build appears broken on Bun 1.3.9, OR
Add runtime fallback in the wrapper script to try baseline if main binary crashes
Workaround
None. Unable to use OpenCode.
This confirms the issue affects modern CPUs with full AVX2 support, not just older/limited hardware.
❯❯❯ opencode --version
============================================================
Bun v1.3.10 (30e609e0) Linux x64 (baseline)
Linux Kernel v6.8.0 | glibc v2.39
Args: "opencode" "--user-agent=opencode/1.2.17" "--use-system-ca" "--" "--version"
Features: jsc no_avx2 no_avx standalone_executable
Builtins: "bun:main"
Elapsed: 22904ms | User: 19277ms | Sys: 3626ms
RSS: 15.96GB | Peak: 8.69GB | Commit: 15.96GB | Faults: 0 | Machine: 16.77GB
CPU lacks AVX support. Please consider upgrading to a newer CPU.
panic(main thread): Segmentation fault at address 0x42FC8000000
oh no: Bun has crashed. This indicates a bug in Bun, not your code.
To send a redacted crash report to Bun's team,
please file a GitHub issue using the link below:
https://bun.report/1.3.10/Ba130e609eEggggigD40guyE+ypRgky19CmrtoqDk95mqD+l0m2DorzvnE6xt2sEw+towF_iznziEiznziEiznziEiznziEiznziEiznziEiznziEiznziEiznziEiznziEA2+iChgggg4B
fish: Job 1, 'opencode --version' terminated by signal SIGILL (Illegal instruction)
I hit the same issue on my Ubuntu VM spawned using libvirt. It's eating all the memory and then crashes.
❯❯❯ lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Address sizes: 40 bits physical, 48 bits virtual
Byte Order: Little Endian
CPU(s): 14
On-line CPU(s) list: 0-13
Vendor ID: AuthenticAMD
BIOS Vendor ID: QEMU
Model name: QEMU Virtual CPU version 2.5+
BIOS Model name: pc-q35-5.2 CPU @ 2.0GHz
BIOS CPU family: 1
CPU family: 6
Model: 6
Thread(s) per core: 1
Core(s) per socket: 1
Socket(s): 14
Stepping: 3
BogoMIPS: 7599.96
Flags: fpu de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx lm nopl cpuid tsc_known_freq pni cx16 x2apic hypervisor lahf_lm svm 3dnowprefetch vmmcall
Virtualization features:
Virtualization: AMD-V
Hypervisor vendor: KVM
Virtualization type: full
Caches (sum of all):
L1d: 896 KiB (14 instances)
L1i: 896 KiB (14 instances)
L2: 7 MiB (14 instances)
L3: 224 MiB (14 instances)
NUMA:
NUMA node(s): 1
NUMA node0 CPU(s): 0-13
Vulnerabilities:
Gather data sampling: Not affected
Itlb multihit: Not affected
L1tf: Not affected
Mds: Not affected
Meltdown: Not affected
Mmio stale data: Not affected
Reg file data sampling: Not affected
Retbleed: Not affected
Spec rstack overflow: Not affected
Spec store bypass: Vulnerable
Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Spectre v2: Mitigation; Retpolines; STIBP disabled; RSB filling; PBRSB-eIBRS Not affected; BHI Not affected
Srbds: Not affected
Tsx async abort: Not affected
Vmscape: Not affected
❯❯❯ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 24.04.3 LTS
Release: 24.04
Codename: noble
I installed it via
curl -fsSL https://opencode.ai/install | bash
Downgrade to 1.1.51 solves the problem
npm install -g opencode-ai@1.1.51
I'm happy to test stuff if needed.
edit: I found the solution. I had to add change my libvirt VM config to replace CPU settings with <cpu mode='host-passthrough'/>. Now it works
It is very useful to clutter up a GitHub repository by forcing the creation of new issues, even though the old ones were perfectly legitimate and unresolved. 😒
Activity
github-actions commentedon Feb 12, 2026
This issue might be a duplicate of existing issues. Please check:
These issues all stem from the same root cause: OpenCode binaries are compiled with AVX/AVX2 instructions that aren't supported on older CPUs, causing immediate crashes. Your environment (Windows 10 LTSC with an older CPU architecture) is affected by the same bug.
mm98 commentedon Feb 12, 2026
I have a similar challenge. Bun.exe uses all memory and my PC freeze completely. I sometime get "Out of memory" exception in OpenCode desktop. I tried to take a screenshot, but it is completely impossible - since my PC locks up completely.
ZimaBlueee commentedon Feb 12, 2026
Thanks — but this seems different.
My issue is an immediate AVX crash, not high memory usage or system freeze.
Standalone Bun works fine for me, so the problem appears specific to OpenCode’s bundled runtime.
ZimaBlueee commentedon Feb 12, 2026
Root Cause Identified
I was able to reproduce the crash consistently.
The issue is triggered when a custom tool imports
buninside a tool file.This version crashes immediately:
As soon as this tool exists in the
toolsdirectory, OpenCode 1.1.59 crashes on startup or when starting a conversation.Conclusion
The crash appears to be triggered specifically by:
inside a custom tool.
Standalone Bun (v1.3.9) works fine on my system, so this seems related to how Bun is bundled or exposed within OpenCode 1.1.59.
This is not a CPU limitation issue.
luaNewer commentedon Feb 12, 2026
I met same problem as you today,same OS version,same Node version and same OpenCode version!
My temp solution:
Btw,1.1.60 has the same problem,even include 1.1.60 baseline exe version!
Waiting someone fix this...
trollkarlen commentedon Feb 12, 2026
It was introduced in version 1.1.52, version 1.1.51 works without SIGILL for non AVX machines.
It also hides the exit code for SIGILL from the user and just exits without any output with exit code 0.
So a double fault 🥇
rekram1-node commentedon Feb 12, 2026
How many of you are running opencode raw and hit this issue?
Like without custom plugins or tools
Junxiao-Liao commentedon Feb 16, 2026
Raw version, 1.2.5 and 1.2.6 still (tried downloading via curl and npm)
jcmrs commentedon Feb 17, 2026
This confirms the issue affects modern CPUs with full AVX2 support, not just older/limited hardware.
Additional Data Point: i9-14900HX with AVX2 Still Crashes on Windows 11
I'm experiencing the same crash on a modern, high-end CPU with full AVX2 support, confirming this is a Bun packaging bug rather than a CPU limitation.
Environment
CPU: Intel Core i9-14900HX
wmic cpu get captionshowsIntel64 Family 6 Model 183OS: Windows 11
OpenCode Version: 1.2.6
Installation Method: npm (
npm install -g opencode-ai)Bun Version: 1.3.9 (cf6cdbbb)
Crash Output
Key Observations
CPU: sse42 avx avx2) but still crashesopencode-windows-x64andopencode-windows-x64-baselineinnode_modules, but npm resolves to the non-baseline version by defaultReproduction Steps
Suggested Fix
The npm package should either:
Workaround
None. Unable to use OpenCode.
This confirms the issue affects modern CPUs with full AVX2 support, not just older/limited hardware.
thdxr commentedon Feb 17, 2026
^ if you download bun 1.3.9 non-baseline does it also not work? we're trying to figure out if this is a bun problem or an us problem
jcmrs commentedon Feb 17, 2026
opencode-windows-x64-baseline <- Used (crashes)
But: peculiarly.
trollkarlen commentedon Feb 28, 2026
Any update on this?
And it's all platforms not just windows.
jakubdyszkiewicz commentedon Mar 5, 2026
I hit the same issue on my Ubuntu VM spawned using libvirt. It's eating all the memory and then crashes.
I installed it via
Downgrade to
1.1.51solves the problemI'm happy to test stuff if needed.
edit: I found the solution. I had to add change my libvirt VM config to replace CPU settings with
<cpu mode='host-passthrough'/>. Now it workskskyj commentedon Mar 19, 2026
I’ve found the root cause of this issue!
It seems to be triggered by the presence of a
.envfile in the directory where opencode is executed.Here is what I discovered:
If the
.envfile is empty (0kb), it works fine.If the
.envfile has any content, the issue occurs.As a workaround, check if there is an existing .env file in your current working directory and try removing or emptying it.
github-actions commentedon Jul 3, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.
glepretre commentedon Jul 3, 2026
It is very useful to clutter up a GitHub repository by forcing the creation of new issues, even though the old ones were perfectly legitimate and unresolved. 😒