[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
- 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.
19 Comments
this warning only occurs on x86_64 builds of Bun (of which
claudeis a single-file-executable of) and so if you are on an M4 mac (which is arm64) you may have somehow installed the wrongclaudebinary and are running it through Rosetta emulation instead of natively.I managed to fix it by re-installing it with the recommended steps, but the problem keeps creeping back on auto-update.
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?
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 | bashbut it still pulls down the x86_64 version. The installer doesn't seem to bedetecting Apple Silicon correctly.
Same problem here, with the native version of Claude
I am having the same issue on M2 ☝️
FYI on my MacBookPro M3 I have removed the warning by :
rm ~/.local/bin/claudebrew install --cask claude-codeGitHub 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)
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:
Quick Start:
Results
After migration:
Impact
This issue affects anyone who:
The migration tool ensures you get native ARM64 binaries for all your development tools, eliminating the AVX warning and significantly improving performance.
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?
@joaquimscosta thank you very much for the insights and scripts!
I fixed this by making sure
bunandclaudewere both arm64. In my case, I had a~/.local/bin/claudethat was x86_64, and that was being run instead of what I installed vianpm. Here are my sanity checks:The
curlcommand did install thex86_64version ofclaude-codeon my MacBook Pro M2.I had to uninstall and reinstall using the
brew install --cask claude-codecommand.What's convenient is that you can ask
claudeto uninstall itself while preserving the previous configuration.Mac mini (M4 Pro), same issue here.
My terminal was running under Rosetta (
uname -mreturnedx86_64), so the installer downloaded the Intel binary.This fixed it:
No more AVX warning!
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.
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 ranbash -c 'uname -m', it gavearm64. So I don't understand whybrew install bashshould have changed the architecture under which claude got installed, yet it did ¯\_(ツ)_/¯A very simple 1-line solution to this on macOS:
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)
Closing for now — inactive for too long. Please open a new issue if this is still relevant.
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.