anthropics / anthropics/claude-code-action
App token exchange fails with 401 'not installed' despite confirmed GitHub App install + fresh OAuth token
- 主要语言
- TypeScript
- 星标
- 8.9k
- 派生
- 2.1k
- PR 合并指标
- PR 指标待抓取
描述
## Summary
The `claude-code-action@v1` action consistently fails during the OIDC→app-token exchange step with:
```
App token exchange failed: 401 Unauthorized - Claude Code is not installed on this repository. Please install the Claude Code GitHub App at https://github.com/apps/claude
```
This happens on every run (6 consecutive attempts), including after ruling out every locally-controllable cause.
## Environment
- Repo: `ryoichi-nawa/claude-code-book-template` (personal account, not an org)
- Workflows: `.github/workflows/claude.yml` and `.github/workflows/claude-code-review.yml`, added via `/install-github-app`
- Trigger: `issue_comment` event, run id `31939606196`
## Steps already taken (all confirmed, none resolved the error)
1. Installed the Claude GitHub App at `https://github.com/apps/claude`, confirmed via `https://github.com/settings/installations` that it's listed with explicit access to this repo.
2. Fully uninstalled and reinstalled the GitHub App (to force fresh installation webhooks) — same error afterward.
3. Regenerated `CLAUDE_CODE_OAUTH_TOKEN` via `claude setup-token` and updated the repo secret with `gh secret set` — confirmed via `gh secret list` that the secret's `updated_at` timestamp changed (`2026-08-16T09:29:16Z` → `2026-08-16T10:02:53Z`). Re-ran the job with the fresh token — identical 401 error.
## Relevant log excerpt
```
Auto-detected mode: agent for event: pull_request
Requesting OIDC token...
Attempt 1 of 3...
OIDC token successfully obtained
Exchanging OIDC token for app token...
Attempt 1 of 3...
App token exchange failed: 401 Unauthorized - Claude Code is not installed on this repository. Please install the Claude Code GitHub App at https://github.com/apps/claude
Retrying in 5 seconds...
Attempt 1 failed: Claude Code is not installed on this repository. Please install the Claude Code GitHub App at https://github.com/apps/claude
...
Operation failed after 3 attempts
##[error]Action failed with error: Claude Code is not installed on this repository. Please install the Claude Code GitHub App at https://github.com/apps/claude
```
## Expected behavior
Given the GitHub App is confirmed installed with access to the repo and the OAuth token is freshly issued, the app-token exchange should succeed.
## Actual behavior
401 Unauthorized on every attempt, with the same "not installed" message, regardless of app reinstall or token regeneration — suggesting a possible sync/caching issue on the backend side of the OIDC↔GitHub-App-installation lookup, rather than anything wrong with the local repo/app configuration.
贡献指南
评估
这个 Issue 还没有评估数据。