[BUG]

Resolved 💬 2 comments Opened Jul 1, 2026 by Priyanshu20240 Closed Jul 4, 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?

The NPM package for @anthropic-ai/claude-code (v2.1.197) is incorrectly distributing the native Linux ELF binary with a .exe file extension (/bin/claude.exe).

What Should Happen?

This completely breaks global execution in Docker and CI/CD environments. When executed via docker exec or on systems with binfmt_misc enabled, the kernel misidentifies the ELF binary as a Windows executable, causing a fatal unable to start container process: executable file not found in $PATH error.

Fix: Remove the .exe extension from the Linux distribution of the binary in the npm packaging pipeline.

Error Messages/Logs

OCI runtime exec failed: exec failed: unable to start container process: exec: "claude": executable file not found in $PATH

Steps to Reproduce

Spin up a standard Linux Docker container (e.g., node:20-bullseye-slim) on a host with binfmt_misc enabled (which is default on many systems including Docker Desktop for Windows).
Run the global install command:
bash

npm install -g @anthropic-ai/claude-code@2.1.197
Check the binary installation path. You will notice that the native Linux binary has been packaged with a .exe extension:
bash

ls -la /usr/local/lib/node_modules/@anthropic-ai/claude-code/bin/

Output shows: claude.exe

Attempt to execute the CLI externally using Docker's native exec (which simulates automated CI/CD pipeline usage):
bash

docker exec -it <container_name> claude
Expected Result: The Claude CLI launches normally.
Actual Result: The Linux kernel's binfmt_misc module intercepts the .exe extension, misidentifies the ELF binary as a Windows executable, and the runtime crashes with the following error:

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

v2.1.197

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Windows Terminal

Additional Information

_No response_

View original on GitHub ↗

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