[BUG] 2.1.129 install subcommand intermittently fails to create ~/.local/bin/claude

Resolved 💬 3 comments Opened May 6, 2026 by AlexanderMuench Closed Jun 11, 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?

On 2026-05-06, two CI runs of an identical job (same GitLab runner, same node:24-slim image digest, same Claude Code version 2.1.129) produced different outcomes. One run placed the claude binary at ~/.local/bin/claude; the other ran the same curl -fsSL https://claude.ai/install.sh | bash and never created ~/.local/bin/ — the directory and the binary were both missing afterward. The installer's own post-install verifier confirmed the absence on the failing run with these notes:

● installMethod is native, but directory /root/.local/bin does not exist
● installMethod is native, but claude command not found at /root/.local/bin/claude

So this isn't a PATH issue — there's nothing at the install location to put on PATH. The install subcommand silently no-op'd on the binary-placement step.

Adjacent (closest existing issue): #26173 ("Native installer ... fails to create ~/.local/bin/claude launcher"), closed/stale.

What Should Happen?

The install subcommand should reliably create ~/.local/bin/ and place the claude binary there. If something prevents that (e.g., a transient download failure of the binary's payload, a filesystem error, etc.), the install should retry or fail visibly — never report success while the binary directory wasn't created.

Error Messages/Logs

Run A (passed) — binary IS placed:
⚠ Setup notes:
  ● Native installation exists but ~/.local/bin is not in your PATH. ...
✔ Claude Code successfully installed!
  Version: 2.1.129
  Location: ~/.local/bin/claude
✅ Installation complete!

Run B (failed) — binary NOT placed, ~20 minutes later, same runner / image / version:
⚠ Setup notes:
  ● installMethod is native, but directory /root/.local/bin does not exist
  ● installMethod is native, but claude command not found at /root/.local/bin/claude
  ● Native installation exists but ~/.local/bin is not in your PATH. ...
✔ Claude Code successfully installed!
  Version: 2.1.129
  Location: ~/.local/bin/claude
✅ Installation complete!

Run B follow-up:
$ ls -la ~/.local/bin/claude
ls: cannot access '/root/.local/bin/claude': No such file or directory
$ claude --version
/bin/sh: 1: claude: not found

Steps to Reproduce

This was observed in a GitLab CI job on a node:24-slim container running as root. The minimal repro is:

  1. Start a fresh node:24-slim container (digest sha256:03eae3ef7e88a9de535496fb488d67e02b9d96a063a8967bae657744ecd513f2).
  2. Run:

``sh
apt-get update && apt-get install -y --no-install-recommends curl ca-certificates
curl -fsSL https://claude.ai/install.sh | bash
ls -la "$HOME/.local/bin/claude"
``

  1. The installer prints ✔ Claude Code successfully installed!. Expected: ~/.local/bin/claude exists on disk and is executable.
  2. Intermittently — observed once across two consecutive runs on the same runner ~20 minutes apart — the ls step fails with "No such file or directory" because the install never created ~/.local/bin/ or placed the binary.

Trigger appears to be transient (a CDN blip during the binary's secondary download is the most likely root cause), but reproducing it on demand isn't easy. The two real-world runs documented in this issue are the same image, same version, same runner — only one places the binary.

Claude Model

None

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.129

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

Non-interactive/CI environment

Additional Information

Timestamps (UTC, 2026-05-06)

  • Run A (binary placed): began ~05:25:10Z, duration 3m53s
  • Run B (binary NOT placed): began ~05:44:58Z, duration 1m15s
  • Gap between runs: ~19m48s

Environment

  • GitLab CI, self-managed runner — same runner instance for both runs
  • Image: node:24-slim digest sha256:03eae3ef7e88a9de535496fb488d67e02b9d96a063a8967bae657744ecd513f2
  • $HOME = /root
  • Node: v24.15.0

View original on GitHub ↗

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