Skip to content

Claude GitHub Action fails with exit code 1 despite valid GitHub App token and correct setup #1155

@ihsanyurttas

Description

@ihsanyurttas

Summary

Claude GitHub Action starts successfully but consistently fails with exit code 1, even though the setup appears correct and all required tokens are provided.

This does not appear to be a repository misconfiguration.


What works

  • Workflow triggers correctly on issue_comment
  • @claude mention is detected
  • Claude posts initial comment: "Claude Code is working..."
  • Anthropic API key is correctly configured
  • GitHub App is created and installed
  • Custom GitHub App token is generated and passed explicitly

Workflow

name: Claude Code

on:
  issue_comment:
    types: [created]

jobs:
  claude:
    if: contains(github.event.comment.body, '@claude')
    runs-on: ubuntu-latest
    permissions:
      contents: write
      pull-requests: write
      issues: write
      id-token: write

    steps:
      - uses: actions/create-github-app-token@v2
        id: app-token
        with:
          app-id: ${{ secrets.APP_ID }}
          private-key: ${{ secrets.APP_PRIVATE_KEY }}

      - uses: anthropics/claude-code-action@main
        with:
          anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
          github_token: ${{ steps.app-token.outputs.token }}

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:permissionsbugSomething isn't workingp2Non-showstopper bug or popular feature request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions