anthropics / anthropics/claude-code-action

Claude Code process exits with code 1 during PR review (SDK execution error)

Aperta
#911 3 commenti 20 reazioni 0 assegnatari Vedi su GitHub
bug p1 provider:1p
Lingua principale
TypeScript
Stelle
8.9k
Fork
2.1k
Merge medio
3g 9h
PR unite (30g)
10

Descrizione

## Description

The `claude-code-action@v1` consistently fails with `Claude Code process exited with code 1` during PR reviews. Auth succeeds (OIDC token obtained, app token obtained), but the Claude Code process itself crashes.

## Reproduction

- **Repo:** private org repo using `anthropics/claude-code-action@v1`
- **Trigger:** `pull_request` events (opened, synchronize)
- **Frequency:** 100% — fails on every run, including manual re-runs

## Workflow config

```yaml
- name: Claude Code Review
uses: anthropics/claude-code-action@v1
with:
use_sticky_comment: true
prompt: |
Review this PR...
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
allowed_bots: "dependabot[bot]"
claude_args: |
--max-turns 10
```

## Permissions

```yaml
permissions:
contents: read
pull-requests: write
issues: write
id-token: write
```

## Logs

Auth succeeds:
```
Requesting OIDC token...
OIDC token successfully obtained
Exchanging OIDC token for app token...
App token successfully obtained
Using GITHUB_TOKEN from OIDC
✓ Updated remote URL with authentication token
```

Then crashes:
```
SDK execution error: [minified SDK code...]
error: Claude Code process exited with code 1
at $ (/home/runner/work/_actions/anthropics/claude-code-action/v1/node_modules/@anthropic-ai/claude-agent-sdk/sdk.mjs:19:7857)
at emit (node:events:98:22)
at #handleOnExit (node:child_process:520:14)

##[error]Action failed with error: SDK execution error: Error: Claude Code process exited with code 1
```

## Environment

- Runner: `ubuntu-latest`
- Action version: `anthropics/claude-code-action@v1`
- Auth method: `claude_code_oauth_token` (org-level secret, "Private repositories" access)
- Date: 2026-02-08

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.