Linux x64 binary in v2.1.159 installs as invalid executable (exec format error)

Resolved 💬 2 comments Opened Jun 1, 2026 by nightlyworker Closed Jun 3, 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?

Summary

After upgrading Claude Code to v2.1.159 using Bun on Linux x64, the claude command became unusable and failed with:

zsh: exec format error: claude

Downgrading to v2.1.158 resolved the issue immediately.

Environment

  • OS: Linux
  • Architecture: x86_64
  • Package manager: Bun
  • Claude Code v2.1.159 (broken)
  • Claude Code v2.1.158 (working)

Steps to Reproduce

bun install -g @anthropic-ai/claude-code
claude /usage

Observed Behavior

The installed binary is linked to:

~/.bun/install/global/node_modules/@anthropic-ai/claude-code-linux-x64/claude

The file appears invalid:

file ~/.bun/install/global/node_modules/@anthropic-ai/claude-code-linux-x64/claude

Output:

data

Inspecting the first bytes:

xxd -l 32 ~/.bun/install/global/node_modules/@anthropic-ai/claude-code-linux-x64/claude

Output:

00000000: 0000 0000 0000 0000 0000 0000 0000 0000
00000010: 0000 0000 0000 0000 0000 0000 0000 0000

Attempting to execute it results in:

zsh: exec format error: claude

Expected Behavior

The installed claude binary should be a valid Linux x64 executable and launch normally.

Workaround

Downgrading to v2.1.158 restores normal operation:

bun remove -g @anthropic-ai/claude-code
bun add -g @anthropic-ai/claude-code@2.1.158

After downgrading, the CLI works as expected.

What Should Happen?

I should see claude /usage output and should ibe able to use claude :-)

Error Messages/Logs

Steps to Reproduce

Steps to Reproduce

  1. On a Linux x86_64 system with Bun installed, remove any existing Claude Code installation:
bun remove -g @anthropic-ai/claude-code
  1. Install Claude Code v2.1.159:
bun add -g @anthropic-ai/claude-code@2.1.159
  1. Verify the installed binary:
file ~/.bun/install/global/node_modules/@anthropic-ai/claude-code-linux-x64/claude
  1. Attempt to run Claude Code:
claude --version

or

claude /usage

Actual Result

The command fails with:

zsh: exec format error: claude

The installed binary is reported as:

data

instead of a valid ELF executable.

Expected Result

claude launches normally and reports its version or executes the requested command.

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

latest

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

WSL (Windows Subsystem for Linux)

Additional Information

_No response_

View original on GitHub ↗

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