[BUG] Claude Code 2.1.83+ fails to execute on WSL 1: "cannot execute binary file: Exec format error"

Resolved 💬 2 comments Opened Mar 26, 2026 by Igor-FP Closed Mar 26, 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?

What's Wrong?

Claude Code versions 2.1.83 and 2.1.84 fail to start on WSL 1 with Exec format error. Version 2.1.81 works fine on the same system.

$ ~/.local/bin/claude --continue
/bin/bash: line 1: /home/igor/.local/bin/claude: cannot execute binary file: Exec format error

The symlink points to ~/.local/share/claude/versions/2.1.84, which is a valid ELF x86_64 binary. Direct execution of the binary also fails:

$ /home/igor/.local/share/claude/versions/2.1.84 --version
/bin/bash: line 1: /home/igor/.local/share/claude/versions/2.1.84: cannot execute binary file: Exec format error

But the previous version works:

$ /home/igor/.local/share/claude/versions/2.1.81 --version
2.1.81 (Claude Code)

Root Cause

Comparing ELF program headers between 2.1.81 and 2.1.84, the key difference is in segment 08:

2.1.81 — segment 08 is GNU_STACK (standard, zero file size):

  GNU_STACK      0x0000000000000000 0x0000000000000000 0x0000000000000000
                 0x0000000000000000 0x0000000000c35000  RW     0x0

2.1.84 — segment 08 is a new LOAD segment containing a .bun section (~129 MB):

  LOAD           0x0000000006568000 0x0000000006868000 0x0000000006868000
                 0x0000000007b55000 0x0000000007b55000  R      0x1000

The .bun LOAD segment was introduced in the Bun runtime update between 2.1.81 and 2.1.83. WSL 1's ELF loader (which is a syscall translation layer, not a real Linux kernel) cannot handle this segment layout.

This is a known class of WSL 1 incompatibility — Ubuntu previously hit the exact same issue with gzip (LP#1966849) where non-standard LOAD segment alignment caused Exec format error on WSL 1 only. Cursor CLI also broke on WSL 1 for the same reason after a similar update.

Environment

  • OS: Windows 10
  • WSL version: WSL 1 (Ubuntu, uname -m = x86_64)
  • Working version: 2.1.81
  • Broken versions: 2.1.83, 2.1.84
  • Installation method: Native installer (~/.local/bin/claude symlink)
  • Shell: PowerShell calling into WSL via @wsl ~/.local/bin/claude %*

Verification

  • file reports valid ELF 64-bit LSB executable, x86-64 for all versions
  • ldd resolves all shared libraries successfully for all versions
  • readelf -n shows identical ABI tag (Linux 3.2.0) for all versions
  • readelf -d shows identical NEEDED libraries for all versions
  • ELF magic bytes confirmed: 7f 45 4c 46
  • Other ELF binaries (e.g., /bin/ls) execute normally on the same WSL 1 instance
  • A long-running 2.1.81 session continues to work on the same system

Expected Behavior

Claude Code should execute on WSL 1, as it did in version 2.1.81 and earlier.

Suggested Fix

The Bun standalone executable build should use portable ELF segment alignment compatible with WSL 1's ELF loader. This may need to be addressed upstream in Bun (oven-sh/bun), or Claude Code's build pipeline could pass linker flags to ensure WSL 1 compatibility.

What Should Happen?

Claude Code should execute on WSL 1, as it did in version 2.1.81 and earlier.

Error Messages/Logs

$ /home/igor/.local/share/claude/versions/2.1.84 --version
/bin/bash: line 1: /home/igor/.local/share/claude/versions/2.1.84: cannot execute binary file: Exec format error

$ /home/igor/.local/share/claude/versions/2.1.81 --version
2.1.81 (Claude Code)

Steps to Reproduce

  1. Have WSL 1 (Ubuntu) on Windows 10
  2. Install Claude Code via native installer
  3. Claude Code auto-updates to 2.1.83 or 2.1.84
  4. Run: claude --version
  5. Get "cannot execute binary file: Exec format error"
  6. Run previous version directly: ~/.local/share/claude/versions/2.1.81 --version — works fine

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

2.1.81

Claude Code Version

2.1.84 (Claude Code)

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

WSL (Windows Subsystem for Linux)

Additional Information

Comparing ELF program headers (readelf -l) between working 2.1.81 and broken 2.1.84:

2.1.81 segment 08: GNU_STACK (standard, zero file size)
2.1.84 segment 08: LOAD with .bun section, ~129 MB, alignment 0x1000

This is a known class of WSL 1 ELF loader incompatibility. Ubuntu hit the same issue with gzip (LP#1966849). Cursor CLI also broke on WSL 1 for the same reason.

WSL version: 1 (not WSL 2)
Windows build: Windows 10
uname -m: x86_64
All other ELF binaries execute normally.

View original on GitHub ↗

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