anthropics / anthropics/claude-code-action

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

オープン
#906 コメント 0 件 リアクション 2 件 担当者 0 名 GitHub で見る
bug p2 provider:1p
主要言語
TypeScript
スター
8.9k
フォーク
2.1k
平均マージ
3日 9時間
マージ済み PR(30日)
10

説明

## 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`

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。