OpenCode 1.1.59 crashes immediately on chat (Bun AVX crash) #9151

Open
opened 2026-02-16 18:11:45 -05:00 by yindo · 8 comments
Owner

Originally created by @ZimaBlueee on GitHub (Feb 12, 2026).

Originally assigned to: @rekram1-node on GitHub.

Description

Description

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/)...

Plugins

oh-my-opencode

OpenCode version

1.1.59 (installed via Scoop)

Steps to reproduce

No response

Screenshot and/or share link

Image

Operating System

Windows 10 Enterprise LTSC 1809

Terminal

wezterm

Originally created by @ZimaBlueee on GitHub (Feb 12, 2026). Originally assigned to: @rekram1-node on GitHub. ### Description ## Description 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/)... ``` ### Plugins oh-my-opencode ### OpenCode version 1.1.59 (installed via Scoop) ### Steps to reproduce _No response_ ### Screenshot and/or share link <img width="1916" height="539" alt="Image" src="https://github.com/user-attachments/assets/b34609ae-d903-42a8-8e2f-baed2ecf01d6" /> ### Operating System Windows 10 Enterprise LTSC 1809 ### Terminal wezterm
yindo added the windowsbugperf labels 2026-02-16 18:11:45 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Feb 12, 2026):


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

  • #8744: [Bug] Windows binary selection picks AVX version on non-AVX CPUs
  • #12642: Windows: opencode-cli crashes with illegal instruction on AMD FX-8350 starting in v1.1.52
  • #12512: SIGILL (Illegal Instruction) on Intel Xeon E3-1270 V2 (no AVX-512/AVX2 support)
  • #12553: Windows: Installer should detect CPU capabilities and use baseline binary for CPUs without AVX2

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.

@github-actions[bot] commented on GitHub (Feb 12, 2026): --- This issue might be a duplicate of existing issues. Please check: - #8744: [Bug] Windows binary selection picks AVX version on non-AVX CPUs - #12642: Windows: opencode-cli crashes with illegal instruction on AMD FX-8350 starting in v1.1.52 - #12512: SIGILL (Illegal Instruction) on Intel Xeon E3-1270 V2 (no AVX-512/AVX2 support) - #12553: Windows: Installer should detect CPU capabilities and use baseline binary for CPUs without AVX2 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.
Author
Owner

@mm98 commented on GitHub (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.

@mm98 commented on GitHub (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.
Author
Owner

@ZimaBlueee commented on GitHub (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 commented on GitHub (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.
Author
Owner

@ZimaBlueee commented on GitHub (Feb 12, 2026):

Root Cause Identified

I was able to reproduce the crash consistently.

The issue is triggered when a custom tool imports bun inside a tool file.

This version crashes immediately:

import { tool } from "@opencode-ai/plugin"
import path from "path"
import { $ } from "bun"

export default tool({
    description: "xxx",
    args: {
        table_name: tool.schema.string().describe("xxx"),
        category_name: tool.schema.string().optional().describe("xxx"),
    },
    async execute(args, context) {
        const { table_name, category_name } = args
        const script = path.join(context.directory, "tools/create-business-entity.js")
        
        const result = await $`node ${script} ${table_name} ${category_name ?? "xxx"}`.text()

        return result
    },
})

As soon as this tool exists in the tools directory, OpenCode 1.1.59 crashes on startup or when starting a conversation.


Conclusion

The crash appears to be triggered specifically by:

import { $ } from "bun"

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.

@ZimaBlueee commented on GitHub (Feb 12, 2026): ## Root Cause Identified I was able to reproduce the crash consistently. The issue is triggered when a custom tool imports `bun` inside a tool file. This version **crashes immediately**: ```ts import { tool } from "@opencode-ai/plugin" import path from "path" import { $ } from "bun" export default tool({ description: "xxx", args: { table_name: tool.schema.string().describe("xxx"), category_name: tool.schema.string().optional().describe("xxx"), }, async execute(args, context) { const { table_name, category_name } = args const script = path.join(context.directory, "tools/create-business-entity.js") const result = await $`node ${script} ${table_name} ${category_name ?? "xxx"}`.text() return result }, }) ```` As soon as this tool exists in the `tools` directory, OpenCode 1.1.59 crashes on startup or when starting a conversation. --- ## Conclusion The crash appears to be triggered specifically by: ``` import { $ } from "bun" ``` 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.
Author
Owner

@luaNewer commented on GitHub (Feb 12, 2026):

I met same problem as you today,same OS version,same Node version and same OpenCode version!

My temp solution:

  1. set autoupdate to false in opencode.json;
  2. use baseline 1.1.59 opencodex.exe instead,replace it in none baseline folder.

Btw,1.1.60 has the same problem,even include 1.1.60 baseline exe version!
Waiting someone fix this...

@luaNewer commented on GitHub (Feb 12, 2026): I met same problem as you today,same OS version,same Node version and same OpenCode version! My temp solution: 1. set autoupdate to false in opencode.json; 2. use baseline 1.1.59 opencodex.exe instead,replace it in none baseline folder. Btw,1.1.60 has the same problem,even include 1.1.60 baseline exe version! Waiting someone fix this...
Author
Owner

@trollkarlen commented on GitHub (Feb 12, 2026):

It was introduced in version 1.1.52, version 1.1.51 works without SIGILL for non AVX machines.

for a in $(seq 53 -1 50); do echo "installing"; yarn global add opencode-ai@1.1.$a; echo "testing"; timeout 5 opencode >/dev/null; RET=$?; if [[ $RET == 124 ]]; then echo "exit code $RET in version $a, it works ?"; break; else echo "failed $RET"; fi; done

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 🥇

@trollkarlen commented on GitHub (Feb 12, 2026): It was introduced in version 1.1.52, version 1.1.51 works without SIGILL for non AVX machines. ``` bash for a in $(seq 53 -1 50); do echo "installing"; yarn global add opencode-ai@1.1.$a; echo "testing"; timeout 5 opencode >/dev/null; RET=$?; if [[ $RET == 124 ]]; then echo "exit code $RET in version $a, it works ?"; break; else echo "failed $RET"; fi; done ``` 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 🥇
Author
Owner

@rekram1-node commented on GitHub (Feb 12, 2026):

How many of you are running opencode raw and hit this issue?

Like without custom plugins or tools

@rekram1-node commented on GitHub (Feb 12, 2026): How many of you are running opencode raw and hit this issue? Like without custom plugins or tools
Author
Owner

@Junxiao-Liao commented on GitHub (Feb 16, 2026):

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:
@Junxiao-Liao commented on GitHub (Feb 16, 2026): > 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: ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#9151