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 }}
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
issue_comment@claudemention is detectedWorkflow