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
[BUG] Illegal instruction crash on CPUs without AVX after 2.1.112 (native binary regression) #50384
Confirming the same regression on macOS Intel (Mac mini, x86_64) — not only Linux.
Environment
Device: Mac mini (Intel, pre-AVX2)
OS: macOS (Darwin 22.6.0)
Node: v25.9.0
Shell: zsh
Install: npm install -g @anthropic-ai/claude-code
Symptom
$ claude
zsh: illegal hardware instruction claude
No output, no stack trace — SIGILL immediately on launch.
Versions tested
Version
Result
2.1.111
Works
2.1.112
Works (last known good)
2.1.113
Crashes (illegal instruction)
2.1.114
Crashes (illegal instruction)
Root cause (matches this issue + #50190 + #33153)
v2.1.113 switched to a native per-platform binary. That binary appears to be compiled with AVX/AVX2 as baseline, breaking older Intel Macs and any non-AVX x86_64 host. Since the native binary is bundled inside the npm package, there is no user-side workaround (swapping bun-baseline globally doesn't help — CC uses its own embedded binary, as documented in #33153).
Workaround
Pin to 2.1.112 and disable auto-updater:
Request
Please ship a baseline x86_64 native binary (no AVX requirement) or fall back to the bundled JS path when the host CPU lacks AVX2. The same class of regression was previously fixed after #19907 / #20019 — the fix just needs to survive the move to native binaries.
changed the title [-][BUG] Illegal instruction crash on CPUs without AVX after 2.1.111 (native binary regression)[/-][+][BUG] Illegal instruction crash on CPUs without AVX after 2.1.112 (native binary regression)[/+]on Apr 18, 2026
For anyone who needs to stay on a current Claude Code version despite this regression, I posted a Node-only workaround over in #37065 — extracts the JS bundle from the .bun ELF section of @anthropic-ai/claude-code-linux-x64 and runs it under system Node, no Bun needed. Verified on Core 2 Duo P7350 (SSE4.1, no SSE4.2/POPCNT/AVX) with 2.1.114 — full TUI, MCP, skills, Glob/Grep. Not a replacement for an upstream fix (a CLAUDE_CODE_FORCE_NODE_FALLBACK=1 env in install.cjs + cli-wrapper.cjs would be the clean one-liner), but it unblocks users in the meantime.
@hibbes - does your workaround work with 2.1.117+? There was a serious problem regarding context handling in Opus 4.7 fixed in that release...
among 2.1.117 bug fixes:
"Opus 4.7's 1M context window was being wasted. Since Opus 4.7 shipped in 2.1.111, context calculations assumed a 200K window. This meant /context showed inflated usage percentages and autocompaction triggered roughly five times too early, effectively capping usable context at 200K. If you noticed Opus 4.7 sessions compacting much sooner than expected, this is the fix."
@jhardin-accumula Yes — confirmed working on 2.1.117. I'm running it on my Core 2 Duo P7350 right now (claude-node --version → 2.1.117 (Claude Code)), and the Opus 4.7 context-window fix is live (/context reports correctly, autocompact no longer fires at ~200K).
For anyone re-running the extraction against 2.1.117, the bundle changed slightly vs. 2.1.116 and needs three small tweaks in the update script:
IIFE header: now has whitespace between params (function(exports, require, module, …)) — replace fixed-string check with a regex allowing [[:space:]]*.
Dep audit: new require subpaths (ajv/dist/runtime/…, fs/promises, path/posix, stream/consumers, timers/promises) get flagged as missing even though the root packages are declared. Reduce to the first path component (or @scope/name) before checking package.json; allow node-builtin subpaths via (/.*)?$.
Bun audit:grep -oE only returns non-overlapping matches, so a second Bun.X inside the same guarded block was being missed. Rewrote in Python with per-occurrence ±200-char windowing; also catches typeof globalThis.Bun and Bun?.-optional chains.
New guarded-via-typeof Bun call sites verified in 2.1.117 (all safe, no shim needed): Bun.gc, Bun.JSONL, Bun.stringWidth, Bun.which, Bun.embeddedFiles, Bun.hash, Bun.stripANSI, Bun.wrapAnsi, Bun.generateHeapSnapshot. The only ungarded Bun calls are still Bun.spawn / Bun.listen / Bun.Transpiler, all inside try/catch and never triggered in practice.
Still believe the proper fix is upstream — a CLAUDE_CODE_FORCE_NODE_FALLBACK=1 env honored in install.cjs + cli-wrapper.cjs would kill the whole class of pre-AVX2 CPU regressions without bundling a second binary. But in the meantime: yes, current main works, and you get the Opus 4.7 context fix.
Reacted by John Hardin (Accumula), Dustin Lucien and alanlaird
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.
Activity
github-actions commentedon Apr 18, 2026
Found 3 possible duplicate issues:
invalid opcodeon non-AVX CPUs (same as fixed #19907) #37277This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
gcampaner commentedon Apr 18, 2026
Confirming the same regression on macOS Intel (Mac mini, x86_64) — not only Linux.
Environment
npm install -g @anthropic-ai/claude-codeSymptom
No output, no stack trace — SIGILL immediately on launch.
Versions tested
Root cause (matches this issue + #50190 + #33153)
v2.1.113 switched to a native per-platform binary. That binary appears to be compiled with AVX/AVX2 as baseline, breaking older Intel Macs and any non-AVX x86_64 host. Since the native binary is bundled inside the npm package, there is no user-side workaround (swapping
bun-baselineglobally doesn't help — CC uses its own embedded binary, as documented in #33153).Workaround
Pin to 2.1.112 and disable auto-updater:
npm install -g @anthropic-ai/claude-code@2.1.112 export DISABLE_AUTOUPDATER=1Request
Please ship a baseline x86_64 native binary (no AVX requirement) or fall back to the bundled JS path when the host CPU lacks AVX2. The same class of regression was previously fixed after #19907 / #20019 — the fix just needs to survive the move to native binaries.
neverbot commentedon Apr 18, 2026
Confirming on Intel Core 2 Duo P7550 (MacBook Pro running NixOS). CPU flags include
sse4_1but lacksse4_2,popcntandavx— belowx86-64-v2.Bisection: 2.1.100/107/110/112 work, 2.1.113 and 2.1.114 crash with
Illegal instruction (core dumped). Workaround confirmed:npm install -g @anthropic-ai/claude-code@2.1.112+"autoUpdates": falsein~/.claude/settings.json.+1 for a baseline x86_64 build or JS fallback when AVX is missing.
[-][BUG] Illegal instruction crash on CPUs without AVX after 2.1.111 (native binary regression)[/-][+][BUG] Illegal instruction crash on CPUs without AVX after 2.1.112 (native binary regression)[/+]hibbes commentedon Apr 19, 2026
For anyone who needs to stay on a current Claude Code version despite this regression, I posted a Node-only workaround over in #37065 — extracts the JS bundle from the
.bunELF section of@anthropic-ai/claude-code-linux-x64and runs it under system Node, no Bun needed. Verified on Core 2 Duo P7350 (SSE4.1, no SSE4.2/POPCNT/AVX) with 2.1.114 — full TUI, MCP, skills, Glob/Grep. Not a replacement for an upstream fix (aCLAUDE_CODE_FORCE_NODE_FALLBACK=1env ininstall.cjs+cli-wrapper.cjswould be the clean one-liner), but it unblocks users in the meantime.jhardin-accumula commentedon Apr 22, 2026
@hibbes - does your workaround work with 2.1.117+? There was a serious problem regarding context handling in Opus 4.7 fixed in that release...
hibbes commentedon Apr 23, 2026
@jhardin-accumula Yes — confirmed working on 2.1.117. I'm running it on my Core 2 Duo P7350 right now (
claude-node --version→2.1.117 (Claude Code)), and the Opus 4.7 context-window fix is live (/contextreports correctly, autocompact no longer fires at ~200K).For anyone re-running the extraction against 2.1.117, the bundle changed slightly vs. 2.1.116 and needs three small tweaks in the update script:
function(exports, require, module, …)) — replace fixed-string check with a regex allowing[[:space:]]*.ajv/dist/runtime/…,fs/promises,path/posix,stream/consumers,timers/promises) get flagged as missing even though the root packages are declared. Reduce to the first path component (or@scope/name) before checkingpackage.json; allow node-builtin subpaths via(/.*)?$.grep -oEonly returns non-overlapping matches, so a secondBun.Xinside the same guarded block was being missed. Rewrote in Python with per-occurrence ±200-char windowing; also catchestypeof globalThis.BunandBun?.-optional chains.New guarded-via-
typeofBun call sites verified in 2.1.117 (all safe, no shim needed):Bun.gc,Bun.JSONL,Bun.stringWidth,Bun.which,Bun.embeddedFiles,Bun.hash,Bun.stripANSI,Bun.wrapAnsi,Bun.generateHeapSnapshot. The only ungarded Bun calls are stillBun.spawn/Bun.listen/Bun.Transpiler, all inside try/catch and never triggered in practice.Still believe the proper fix is upstream — a
CLAUDE_CODE_FORCE_NODE_FALLBACK=1env honored ininstall.cjs+cli-wrapper.cjswould kill the whole class of pre-AVX2 CPU regressions without bundling a second binary. But in the meantime: yes, current main works, and you get the Opus 4.7 context fix.github-actions commentedon May 27, 2026
Closing for now — inactive for too long. Please open a new issue if this is still relevant.
github-actions commentedon Jul 24, 2026
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.