Skip to content

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

@ErikDeBruijn

Description

@ErikDeBruijn

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

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

{
  "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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingp2Non-showstopper bug or popular feature requestprovider:1pAnthropic First-Party API

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions