-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Claude GitHub Action fails with exit code 1 despite valid GitHub App token and correct setup #1155
Copy link
Copy link
Open
Labels
area:permissionsbugSomething isn't workingSomething isn't workingp2Non-showstopper bug or popular feature requestNon-showstopper bug or popular feature request
Description
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 @claudemention 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 }}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area:permissionsbugSomething isn't workingSomething isn't workingp2Non-showstopper bug or popular feature requestNon-showstopper bug or popular feature request
Type
Fields
Give feedbackNo fields configured for issues without a type.