If you just installed Claude Code on Windows 11 and it crashes the moment you launch it, you're not doing anything wrong. This is a known issue with the runtime Claude Code now ships with, and the fix takes about two minutes.
Here's exactly what I hit, why it happens, and the step-by-step fix that got me running.
The symptom
You install Claude Code, type claude, and instead of the welcome screen you get a wall of text like this:
Bun v1.4.0 (...) Windows x64 (baseline) Windows v10.26100
...
panic(main thread): Segmentation fault at address 0x113
oh no: Bun has crashed. This indicates a bug in Bun, not your code.
Annoyingly, claude --version and claude doctor often work fine — it's only the interactive session that dies. That makes it look like the install succeeded when it didn't.
Why it happens
Claude Code used to run on Node.js. As of v2.1.113 (April 2026), the default build switched to a Bun-compiled native binary. Bun has a segfault bug that triggers on certain Windows builds during interactive startup, so the new binary crashes on launch.
The catch: even installing via npm doesn't save you anymore. The npm package now pulls in that same Bun binary as a platform dependency, and there's no Node.js fallback left in recent versions. So npm i -g @anthropic-ai/claude-code installs the broken binary too.
The fix is to drop back to the last version that still ran on Node.js (2.1.112) and stop the auto-updater from dragging you forward again.
The fix (step by step)
1. Check your Node version
You need Node 18+ for the JS build, but 18 has its own crash, use Node 20 or newer.
node -v
If you're below 20, upgrade before continuing.
2. Pin to the last pre-Bun release
npm i -g @anthropic-ai/claude-code@2.1.112
You should see npm remove a package during this, that's the win32-x64 Bun binary being dropped and replaced with the Node-run build. That's the whole point. (If 2.1.112 misbehaves, @2.1.110 is another confirmed-good version.)
3. Disable the auto-updater
This step is the one people skip — and then their install silently "upgrades" back to the broken binary overnight. There's no settings file toggle to fully turn updates off; the supported way is an environment variable:
[Environment]::SetEnvironmentVariable("DISABLE_AUTOUPDATER","1","User")
(DISABLE_AUTOUPDATER stops background checks. If you want to block every update path including manual ones, use DISABLE_UPDATES instead.)
4. Open a fresh terminal and verify
The env var only reaches new windows, so close the current terminal and open a new one.
claude doctor
You want to see 2.1.112, install method npm-global, and — the point of the whole exercise — no segfault. Then start it:
claude
First launch hands you the auth screen (browser login for Pro/Max, or an API key for Console billing) and a trust prompt for your folder. You're in.
Two things to know afterwards
Ignore the "switch to native installer" banner. Claude Code will nudge you to run claude install. Don't ! that's exactly the path back to the Bun binary and the crash. Leave it alone.
You're now frozen at 2.1.112. That means you'll miss newer features that shipped later. For real work it's perfectly functional, but if you want the latest, the right move isn't to un-pin on Windows — it's WSL2. The Bun crash is Windows-specific; the Linux build runs fine. Install Node inside your distro (make sure which node returns a /usr/... path, not /mnt/c/...), keep your projects on the Linux filesystem, and install Claude Code there to get the current version with no crash.
TL;DR
npm i -g @anthropic-ai/claude-code@2.1.112
[Environment]::SetEnvironmentVariable("DISABLE_AUTOUPDATER","1","User")
# open a new terminal
claude
Pin to the last Node.js build, freeze updates, done.
References
- Claude Code - Troubleshoot installation: https://code.claude.com/docs/en/troubleshoot-install
- Claude Code - Advanced setup (auto-updates, version pinning): https://code.claude.com/docs/en/setup
- Tracking issue (Bun segfault on Windows): https://github.com/anthropics/claude-code/issues/25630
Top comments (0)