Windows: .local\bin\claude.exe installs as plain Bun v1.4.0 instead of Claude Code

Open 💬 2 comments Opened Jun 21, 2026 by ishabana

Bug

After installing/updating Claude Code on Windows (via auto-update or the official install script), two problems occur.

1. .local\bin\claude.exe is plain Bun (no Claude Code)

The binary at %USERPROFILE%\.local\bin\claude.exe ends up as the standalone Bun runtime v1.4.0 with zero Claude Code JS bundled. Running claude in cmd.exe (where .exe takes priority over .cmd/.ps1 shims) launches the Bun help screen instead of Claude Code.

The official install script (install.ps1) downloads the real Claude Code binary from https://downloads.claude.ai/claude-code-releases/<version>/win32-x64/claude.exe, saves it to %USERPROFILE%\.claude\downloads\, then runs <binary> install which sets up the launcher at %USERPROFILE%\.local\bin\claude.exe. After installation the downloaded binary is deleted. On some installs (likely a race condition during auto-update or partial download), the launcher ends up as plain Bun instead of the Claude Code binary.

2. InternalName metadata is bun

The real Claude Code binary also has InternalName: bun in its PE version resource because Anthropic ships it compiled via bun build --compile, which hardcodes InternalName: bun with no flag to override it. Task managers, Get-ItemProperty, and system tooling all report "bun" instead of "claude".

---

Root Cause

  • The installer downloads the real binary, runs install to set up the launcher, then deletes the downloaded binary. On some installs the launcher ends up as plain Bun v1.4.0 — likely a race condition in the install subcommand or a partial/corrupt auto-update.
  • bun build --compile always sets InternalName: bun — there is no build flag to customize this.

---

How We Fixed It Locally

# 1. Reinstall to get a fresh binary
irm https://claude.ai/install.ps1 | iex

# 2. If the launcher is still plain Bun, grab the real binary via npm and copy it over
npm install -g @anthropic-ai/claude-code
Copy-Item "$env:APPDATA\npm\node_modules\@anthropic-ai\claude-code\bin\claude.exe" `
  "$env:USERPROFILE\.local\bin\claude.exe" -Force

# 3. Optionally patch InternalName in the PE version resource
rcedit "$env:USERPROFILE\.local\bin\claude.exe" --set-version-string "InternalName" "claude"

---

Expected Behavior

  • claude --version outputs 2.1.185 (Claude Code) from any shell.
  • Get-ItemProperty on the binary shows InternalName: claude.

Environment

  • Windows 11
  • Claude Code 2.1.185
  • Installed via irm https://claude.ai/install.ps1 | iex (auto-updated to 2.1.185)

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗