anthropics / anthropics/claude-code-action

🤖 v1.0.218: Claude Code 2.1.265 installer reports success but leaves no launcher on ubuntu-latest, every run fails with "native binary not found"

未關閉
#1,817 12 則留言 27 個 reaction 已指派 0 人 在 GitHub 檢視
area:installation bug p1
主要語言
TypeScript
星號
8.9k
分支
2.1k
PR 合併指標
PR 指標待擷取

描述

## Summary

Since v1.0.218 (commit 0d0e087, "bump Claude Code to 2.1.265 and Agent SDK to 0.3.265", tagged `v1` at 2026-09-08 20:39 UTC) every run of the action on `ubuntu-latest` fails before Claude starts:

```
SDK execution error: ReferenceError: Claude Code native binary not found at /home/runner/.local/bin/claude. Please ensure Claude Code is installed via native installer or specify a valid path with options.pathToClaudeCodeExecutable.
telemetryMessage: "Claude Code native binary not found at the configured path (ENOENT)",
errorClass: "executable_not_found",
```

The install step (`curl -fsSL https://claude.ai/install.sh | bash -s -- 2.1.265`) exits 0 and prints "successfully installed" / "Installation complete!", but the 2.1.265 binary's `claude install` never creates the launcher. Its own setup notes say so, twice:

```
Installing Claude Code native build 2.1.265...
Setting up launcher and shell integration...
⚠ Setup notes:
● claude command at /home/runner/.local/bin/claude missing or broken (/home/runner/.local/bin does not exist)
● claude command at /home/runner/.local/bin/claude missing or broken

✔ Claude Code successfully installed!

Version: 2.1.265

Location: ~/.local/bin/claude
```

Because the installer reports success, the retry loop in `installClaudeCode()` never triggers and the action goes on to spawn a path that does not exist.

## Runs

- Failing (v1.0.218, Claude Code 2.1.265): https://github.com/episode6/collins/actions/runs/34285384330 — reran it once, identical failure at the same step.
- Passing earlier the same day on the same image (v1.0.217, Claude Code 2.1.263): https://github.com/episode6/collins/actions/runs/34179464399 — "Setting up launcher and shell integration..." is followed directly by "✔ Claude Code successfully installed!" with no setup notes, and the launcher exists.

The workflow is the stock `issue_comment` / `@claude` tag-mode workflow with `claude_code_oauth_token` and `additional_permissions: actions: read`, nothing else: https://github.com/episode6/collins/blob/main/.github/workflows/claude.yml

## What I could and could not reproduce

- The same install command for 2.1.265 in a fresh `$HOME` on a Linux desktop (no `~/.local` at all) succeeds and creates the `~/.local/bin/claude` symlink, also with `CI=true GITHUB_ACTIONS=true` set and with a nonexistent `$HOME/.local/bin` on `PATH` the way the runner images have it. So it is not a generic installer bug; something on the hosted runner makes the 2.1.265 launcher step fail silently.
- Only the pinned version changed between v1.0.217 and v1.0.218 (`src/entrypoints/run.ts` line 80).

## Workarounds

- Pin the action to v1.0.217 (`anthropics/claude-code-action@9c5ddab2e6d17b83ea679153b31f1d5f023cf636`).
- Or install Claude Code in a previous step and pass `path_to_claude_code_executable`.

## Suggestions

- Verify the executable exists (and runs `--version`) after the install step, so "installed successfully" cannot be printed over a missing launcher and the retry/failure surfaces at the right place.
- The 2.1.265 native installer reporting success while its own diagnostics say the launcher is missing looks like a Claude Code bug; happy to file it there too if you can point at what the launcher step does differently on hosted runners.

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。