[BUG] "illegal hardware instruction" on CPU without AVX2 (Xeon E5 v2)

Status Closed — not planned
Maintainer reply None cached
Activity 14 comments · opened Jan 26, 2026 · closed Apr 15, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Claude Code crashes immediately with "zsh: illegal hardware instruction" on macOS 12 with Intel Xeon E5-2697 v2 CPU.

This CPU (Ivy Bridge, 2013) does not support AVX2 instructions:

  • sysctl -a | grep avx2 returns hw.optional.avx2_0: 0

Claude Code worked fine until recently. After updating, all versions from 1.0.x fail with this error.

Older versions (0.2.40) launch but cannot connect because server requires 1.0.88+.

Environment:

  • macOS 12 Monterey
  • CPU: Intel Xeon E5-2697 v2 (no AVX2)
  • Node: v18.x (via nvm)

Request: Please provide builds without AVX2 requirement, or document minimum CPU requirements.

What Should Happen?

Claude Code should launch and run normally on CPUs without AVX2 support.

Error Messages/Logs

$ claude
zsh: illegal hardware instruction  claude

$ sysctl -n machdep.cpu.brand_string
Intel(R) Xeon(R) CPU E5-2697 v2 @ 2.70GHz

$ sysctl -a | grep avx2
hw.optional.avx2_0: 0

Steps to Reproduce

Steps to Reproduce:

  1. Have a Mac with CPU without AVX2 support (e.g., Intel Xeon E5-2697 v2)
  2. Install Claude Code: npm install -g @anthropic-ai/claude-code
  3. Run: claude
  4. Error appears: "zsh: illegal hardware instruction claude"

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

Cannot run claude --version (crashes with illegal hardware instruction). Installed version: 1.0.88 (latest via npm)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

14 Comments

github-actions[bot] · 7 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/5864
  2. https://github.com/anthropics/claude-code/issues/10408
  3. https://github.com/anthropics/claude-code/issues/20435

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

andrewfb · 7 months ago

Seeing the same, illegal instructions on late 2013 Mac Pro, 2.7 GHz 12-Core Intel Xeon E5. Manifests with both curl install and brew.

Jachimo · 6 months ago

I think this is the same underlying issue as #5864, apparently the "native" builds are compiled with AVX2, while the npm version uses a node.js that's appropriate for the actual hardware (I presume).

briankelley · 6 months ago

Workaround for AVX/CPU Crash. These instructions are for linux which will probably translate. I dunno. I'm not a mac guy.

The crash is caused by the bundled Bun runtime (Bun Canary v1.3.9) attempting to use AVX instructions despite being compiled as "baseline" (no_avx). This affects VMs and older CPUs that don't expose AVX.

Affected versions: 2.1.37+ (including current latest 2.1.39)
Working versions: 2.1.29 (current stable), 2.1.7 (haven't fully tested others)

---
Step 1: Get a working version

Stop using the installer - it downloads the broken latest build first, so you can't even downgrade. Grab a working version directly:

curl -fsSL -o ~/.local/share/claude/versions/2.1.29 "https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/2.1.29/linux-x64/claude"

chmod +x ~/.local/share/claude/versions/2.1.29

Delete the symlink and use an alias instead (the installer keeps recreating that symlink pointing to latest):

rm ~/.local/bin/claude

Add to ~/.bashrc
alias claude='/home/YOUR_USER/.local/share/claude/versions/2.1.29'

---
Step 2: Switch to the stable release channel

Once you have a working version running, switch from latest to stable so future updates don't pull broken builds:

Run /config inside Claude and change your release channel, or edit the config directly:

Edit ~/.claude/settings.json or ~/.claude/settings.local.json

{
"releaseChannel": "stable"
}

---
Step 3: Lock it down

Environment variables (results may vary - these didn't fully prevent automatic updates for me):
export CLAUDE_CODE_DISABLE_AUTOUPDATE=1
export CLAUDE_AUTO_UPDATE=0

The most reliable method I found is locking the versions directory:
chmod 500 ~/.local/share/claude/versions/

This prevents Claude from writing new binaries. When you want to update, unlock it temporarily, download the version you want, then lock it again.

All of the above instructions were the result of me screwing around with this all day. I can appreciate a high velocity CI/CD pipeline that forces EVERY SINGLE USER TO BE BETA TESTERS (e.g. 'latest'), but when you release a breaking version where it's not clear how to revert because the installation process downloads the broken version in order to downgrade, that's an incredibly myopic approach.

Jachimo · 6 months ago

Since 5864 was closed (erroneously, in my view, but whatever) by a bot, this seems to be the issue for the missing-stair AVX requirement in the Bun runtime in releases 2.1.37 - 2.1.39 (at least).

seanconrad1 · 6 months ago

I'm running into the exact same issue as well on a 2012 Macmini, haven't found a version that works for me just yet

barthel · 6 months ago

I have the same error on my Mac Pro 6,1 with version 2.1.50.

I tried the homebrew installation and also the installation via the installer (curl -fsSL https://claude.ai/install.sh | bash). The same error occurred with both variants.

But the Node.js installation works
❯ npm install -g @anthropic-ai/claude-code
❯ claude

Welcome to Claude Code v2.1.50

---

  1. ❯ brew install --cask claude-code
==> Downloading https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/2.1.50/darwin-x64/claude
######################################################################################################################################################### 100.0%
==> Installing Cask claude-code
==> Linking Binary 'claude' to '/usr/local/bin/claude'
🍺  claude-code was successfully installed!
  1. ❯ which claude
/usr/local/bin/claude
  1. ❯ claude --version
Illegal instruction: 4

macOS 15.7.4
Mac Pro 6,1 (Xeon E5, no AVX2)
❯ sysctl -n machdep.cpu.brand_string

Intel(R) Xeon(R) CPU E5-1680 v2 @ 3.00GHz

❯ sysctl -a | grep avx2

hw.optional.avx2_0: 0

❯ sysctl -a | grep machdep.cpu | grep -i avx

machdep.cpu.features: FPU VME DE PSE TSC MSR PAE MCE CX8 APIC SEP MTRR PGE MCA CMOV PAT PSE36 CLFSH DS ACPI MMX FXSR SSE SSE2 SS HTT TM PBE SSE3 PCLMULQDQ DTES64 MON DSCPL VMX SMX EST TM2 SSSE3 CX16 TPR PDCM SSE4.1 SSE4.2 x2APIC POPCNT AES PCID XSAVE OSXSAVE TSCTMR AVX1.0 RDRAND F16C
pescoll · 6 months ago

Same problem in a Mac Pro 2013
Intel(R) Xeon(R) CPU E5-1620 v2 @ 3.70GHz

Edit:
Installed via npm:
npm install -g @anthropic-ai/claude-code

Running it in VS Code terminal mode (chat not working)

treyd · 5 months ago

Same problem on a MacBook Pro Mid 2012
Intel(R) Core(TM) i7-3820QM CPU @ 2.70GHz

npm install works fine, claude install will install one that gives the error

$ claude install

✔ Claude Code successfully installed!

  Version: 2.1.71

  Location: ~/.local/bin/claude


  Next: Run claude --help to get started

⚠ Setup notes:
  • Native installation exists but ~/.local/bin is not in your PATH. Run:

  echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc && source ~/.bashrc

$ ~/.local/bin/claude
Illegal instruction: 4
schaffman5 · 5 months ago

Same issue here on an older Mac without AVX CPU support.

With claude install:

~ % claude
zsh: illegal hardware instruction  claude

NPM version works fine.

github-actions[bot] · 4 months ago

Closing for now — inactive for too long. Please open a new issue if this is still relevant.

loganctallman · 4 months ago

Workaround: Pin to v2.1.111 via npm

For anyone hitting this after April 17–18, 2026 — this appears to have become a regression with the v2.1.112+ release, which introduced a native binary that requires AVX2. If Claude Code was working for you before and suddenly broke overnight, this is likely why.

My setup:

  • Mac Pro (Late 2013), Intel Xeon E5 (Ivy Bridge, no AVX2)
  • macOS 12.7.6 Monterey
  • Node v24.14.0
  • Was working via CLI in VS Code at ~1:15am April 18 — broke after auto-update to v2.1.114

Confirmed workaround (CLI):

npm install -g @anthropic-ai/claude-code@2.1.111

This installs the last version before the native binary change and resolves the zsh: illegal hardware instruction error immediately.

Also note: If your npm global bin directory isn't in your PATH, claude will show as "command not found" even after a successful install. Fix with:

# Check where npm installs global binaries
npm config get prefix

# Add it to your PATH (replace path if different)
echo 'export PATH="$HOME/.npm-global/bin:$PATH"' >> ~/.zshrc && source ~/.zshrc

VS Code extension: The extension bundles its own native binary and has the same AVX2 issue regardless of your npm version. Rolling back the extension version (gear icon → Install Another Version → 2.1.111) may work, but I disabled it and use CLI only.

To prevent auto-updating back to a broken version:

# Lock the version in package.json or just avoid running npm update

In VS Code, disable extension auto-updates: "extensions.autoUpdate": false in settings.json.

Hope this helps others in the same boat while a proper fix is being worked on. +1 for a non-AVX2 build or at minimum documenting the minimum CPU requirements.

chrcan · 4 months ago

I hope the problem will be fixed quickly!
Otherwise, I will be forced to cancel the package.
I’m not going to buy a new Mac just because of Claude.

github-actions[bot] · 4 months ago

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.