anthropics / anthropics/claude-code-action

claude-code-action crashes with prompt parameter on issues:opened event

Offen
#906 0 Kommentare 2 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
bug p2 provider:1p
Vorherrschende Sprache
TypeScript
Sterne
8.9k
Forks
2.1k
Ø Merge
3 T. 9 Std.
Gemergte PRs (30 T.)
10

Beschreibung

## Description

When using `claude-code-action@v1` with a `prompt` parameter triggered by `issues: [opened]`, the Claude Code process exits with code 1 after ~300-500ms with `total_cost_usd: 0`, meaning it never makes an API call.

## Workflow

```yaml
name: Issue Triage
on:
issues:
types: [opened]

jobs:
triage:
runs-on: ubuntu-latest
permissions:
contents: read
issues: write
pull-requests: read
id-token: write
steps:
- uses: actions/checkout@v4
- uses: anthropics/claude-code-action@v1
with:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
prompt: |
Triage and label this issue.
```

## Error output

```json
{
"type": "result",
"subtype": "success",
"is_error": true,
"duration_ms": 306,
"num_turns": 1,
"total_cost_usd": 0,
"permission_denials": []
}
```

Followed by:
```
SDK execution error: 14 | depsCount: ${Q},
15 | deps: ${$}}`};var Cj={keyword:"dependencies"...
error: Claude Code process exited with code 1
```

## What I've tried

- With and without `allowed_tools` parameter
- Various `allowed_tools` syntaxes (`:*` and space wildcard)
- Adding `pull-requests: read` permission
- The `CLAUDE_CODE_OAUTH_TOKEN` secret works (OIDC token exchange succeeds)
- The same token works fine with the interactive `claude.yml` workflow (issue_comment trigger)

## Environment

- `anthropics/claude-code-action@v1` (v1.0.45)
- GitHub-hosted runner (ubuntu-latest)
- Authentication: OIDC via `CLAUDE_CODE_OAUTH_TOKEN`

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.