[BUG] claude outputs a bun warning

Resolved 💬 19 comments Opened Sep 4, 2025 by sarimarton-ofsz Closed Mar 1, 2026

Environment

  • Platform (select one):
  • [x] Anthropic API
  • [ ] AWS Bedrock
  • [ ] Google Vertex AI
  • [ ] Other: <!-- specify -->
  • Claude CLI version: 1.0.103
  • Operating System: macOS 15.6.1
  • Terminal: Terminal App

Bug Description

I get a bun warning when executing claude.

Steps to Reproduce

  1. Execute claude -v

Expected Behavior

It shows its version

Actual Behavior

It shows

$ claude -v
warn: CPU lacks AVX support, strange crashes may occur. Reinstall Bun or use *-baseline build:
  https://github.com/oven-sh/bun/releases/download/bun-v1.2.19/bun-darwin-x64-baseline.zip
1.0.103 (Claude Code)

Additional Context

<img width="613" height="263" alt="Image" src="https://github.com/user-attachments/assets/2bcb617e-1d5b-4a73-a12c-9dfb42b89eaa" />

Also: This is an M4 Macbook Pro.

View original on GitHub ↗

19 Comments

nektro · 10 months ago

this warning only occurs on x86_64 builds of Bun (of which claude is a single-file-executable of) and so if you are on an M4 mac (which is arm64) you may have somehow installed the wrong claude binary and are running it through Rosetta emulation instead of natively.

sarimarton-ofsz · 10 months ago

I managed to fix it by re-installing it with the recommended steps, but the problem keeps creeping back on auto-update.

rbonestell · 10 months ago

I have the same experience, I've directly installed bun (https://github.com/oven-sh/bun/releases/download/bun-v1.2.19/bun-darwin-x64-baseline.zip) and I've used homebrew to install bun, and I still get this warning when starting, and also get frequent crashes with Abort() printing repeatedly from bun. M4 Max MacBook Pro with latest macOS.

Note I install the 'native' version of Claude Code because my team switches node versions with NVM frequently, I feel this is a factor?

daydone · 9 months ago

Still seeing this on M2 Max with Claude Code 2.0.14 after auto-update.

I fixed my system Bun installation to use the native ARM64 version and that works fine now, but Claude Code still shows the warning because it's bundling its own x86_64
version of Bun:

$ file ~/.local/bin/claude
/Users/finbar.day/.local/bin/claude: Mach-O 64-bit executable x86_64

$ claude --version
2.0.14 (Claude Code)
warn: CPU lacks AVX support, strange crashes may occur. Reinstall Bun or use *-baseline build:
https://github.com/oven-sh/bun/releases/download/bun-v1.2.23/bun-darwin-x64-baseline.zip

Tried uninstalling and reinstalling with curl -fsSL https://claude.ai/install.sh | bash but it still pulls down the x86_64 version. The installer doesn't seem to be
detecting Apple Silicon correctly.

georgehossa · 8 months ago

Same problem here, with the native version of Claude

StevenMasini · 8 months ago
_Tried uninstalling and reinstalling with curl -fsSL https://claude.ai/install.sh | bash but it still pulls down the x86_64 version. The installer doesn't seem to be detecting Apple Silicon correctly._

I am having the same issue on M2 ☝️

bertrandjamin · 8 months ago

FYI on my MacBookPro M3 I have removed the warning by :

  • removing claude bin from my path rm ~/.local/bin/claude
  • installing it via Brew (arm build) : brew install --cask claude-code
joaquimscosta · 8 months ago

GitHub Issue Comment for anthropics/claude-code#7107

Root Cause & Permanent Fix for Bun AVX Warning

I experienced this same issue and discovered the root cause: the Bun AVX warning occurs when you have Intel Homebrew (/usr/local) instead of ARM64 Homebrew (/opt/homebrew) on Apple Silicon.

The Problem

When Intel Homebrew is installed on M1/M2/M3/M4 Macs, ALL CLI tools (including Claude Code) run through Rosetta 2 emulation, triggering Bun's AVX detection warning.

Quick Check (15 seconds)

# 1. Verify you have Apple Silicon
sysctl -n machdep.cpu.brand_string
# Should show: Apple M1/M2/M3/M4

# 2. Check Homebrew location
which brew
# ❌ /usr/local/bin/brew = Intel (causes AVX warning)
# ✅ /opt/homebrew/bin/brew = ARM64 (correct)

# 3. Verify binary architecture
file $(which brew)
# ❌ x86_64 = Running via Rosetta → AVX warning
# ✅ arm64 = Native ARM64 → No warning

Permanent Solution

After migrating my entire development environment (146 packages), I created a comprehensive migration tool:

Repository: https://github.com/joaquimscosta/homebrew-arm64-migration

What it does:

  • Complete Intel → ARM64 Homebrew migration
  • Fixes Claude Code Bun AVX warnings permanently
  • 11-phase installation with safety checks
  • Cleanup scripts for remnants
  • Full migration documentation

Quick Start:

curl -fsSL https://raw.githubusercontent.com/joaquimscosta/homebrew-arm64-migration/main/install-homebrew-arm64.sh -o install-homebrew-arm64.sh
chmod +x install-homebrew-arm64.sh
./install-homebrew-arm64.sh --dry-run  # Preview first

Results

After migration:

  • ✅ Claude Code: No more Bun AVX warnings
  • ✅ All tools: Native ARM64
  • ✅ Performance: 20-30% improvement across all CLI operations

Impact

This issue affects anyone who:

  • Migrated from Intel Mac using Time Machine/Migration Assistant
  • Installed Homebrew early in the Apple Silicon transition
  • Followed older installation guides

The migration tool ensures you get native ARM64 binaries for all your development tools, eliminating the AVX warning and significantly improving performance.

timkindberg · 7 months ago

What about if you want to go backwards? Our whole team decided to emulate Intel because our production boxes are Intel boxes and we want to develop in the same environment. So I discovered my brew is Intel (which is correct per my team). What else would I have to check to make sure they are Intel as well?

✗ sysctl -n machdep.cpu.brand_string
Apple M2 Max
✗ which brew
/usr/local/bin/brew
✗ file $(which brew)
/usr/local/bin/brew: Bourne-Again shell script text executable, ASCII text
✗ which claude
/usr/local/bin/claude
✗ which bun
/Users/tim.kindberg/.bun/bin/bun
ariloudev · 7 months ago

@joaquimscosta thank you very much for the insights and scripts!

yrahul3910 · 6 months ago

I fixed this by making sure bun and claude were both arm64. In my case, I had a ~/.local/bin/claude that was x86_64, and that was being run instead of what I installed via npm. Here are my sanity checks:

❯ file $(which bun)
/Users/ryedida/.bun/bin/bun: Mach-O 64-bit executable x86_64         <---- issue 1

# Fix bun
❯ rm -rf ~/.bun
❯ brew tap oven-sh/bun
❯ brew install bun

❯ file $(which bun)
/opt/homebrew/bin/bun: Mach-O 64-bit executable arm64

❯ file $(which claude)
/Users/ryedida/.local/bin/claude: Mach-O 64-bit executable x86_64    <--- issue 2

# Reinstall
❯ sudo npm rm -g @anthropic-ai/claude-code
❯ rm -rf ~/.local/bin/claude
❯ sudo npm i -g @anthropic-ai/claude-code
❯ ln -s $(which claude) ~/.local/bin/claude
StevenMasini · 6 months ago

The curl command did install the x86_64 version of claude-code on my MacBook Pro M2.
I had to uninstall and reinstall using the brew install --cask claude-code command.

What's convenient is that you can ask claude to uninstall itself while preserving the previous configuration.

kgkgzrtk · 5 months ago

Mac mini (M4 Pro), same issue here.

My terminal was running under Rosetta (uname -m returned x86_64), so the installer downloaded the Intel binary.

This fixed it:

rm -rf ~/.local/share/claude/versions/*
arch -arm64 zsh -c 'curl -fsSL https://claude.ai/install.sh | zsh -s latest'

No more AVX warning!

alxmrs · 5 months ago

By default on new macs, bash is x86_64 run with rosetta. Thus, when we follow the default install command (native), claude will be installed with x86 instead of ARM. To fix this issue for claude and other binaries, I installed bash via homebrew, then installed claude the typical way. Make sure to fully remove the x86 claude (and shared folder) before reinstall for this to work.

$ file $(which bash)
/usr/local/bin/bash: Mach-O 64-bit executable x86_64
$ brew install bash
# ...
# closed and re-opened my shell
$ file $(which bash)
/opt/homebrew/bin/bash: Mach-O 64-bit executable arm64
$ rm -f $(which claude)
$ rm -rf ~/.local/share/claude  
$ curl -fsSL https://claude.ai/install.sh | bash 
# ...
$ file $(which claude)
/Users/alxrsngrtn/.local/bin/claude: Mach-O 64-bit executable arm64
dandydavey · 5 months ago

awesome, the above fixed it for me. But just add more info, when I ran file $(which bash), it showed a universal binary and even when I ran bash -c 'uname -m', it gave arm64. So I don't understand why brew install bash should have changed the architecture under which claude got installed, yet it did ¯\_(ツ)_/¯

rbonestell · 5 months ago

A very simple 1-line solution to this on macOS:

curl -fsSL https://claude.ai/install.sh | arch -arm64 bash
srm60 · 5 months ago

Error: curl -fsSL https://claude.ai/install.sh | arch -arm64 bash
arch: posix_spawnp: bash: Bad CPU type in executable
(On MacOS Tahoe, Apple M3 Max)

github-actions[bot] · 4 months ago

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

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.