-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
Describe the bug
Claude Code Action successfully completes a PR review (posts comments to the PR) but then exits with code 5, causing the GitHub Actions workflow to fail. The review is fully functional - comments are posted - but the non-zero exit code breaks CI pipelines.
To Reproduce
- Set up a workflow using
anthropics/claude-code-action@v1with AWS Bedrock - Trigger a PR review via
@claudemention - Claude successfully analyzes the PR and posts review comments
- Action exits with code 5 despite successful execution
Expected behavior
When Claude successfully completes a review and posts comments, the action should exit with code 0.
Screenshots
GitHub Actions log showing the error:
2026-01-20T15:33:16.4373874Z Successfully formatted Claude Code report
...
2026-01-20T15:33:16.7597431Z ##[error]Process completed with exit code 5.
The review was successfully posted (multiple inline comments about SQL injection and N+1 queries were added to the PR).
Workflow yml file
name: Claude PR Review
on:
issue_comment:
types: [created]
jobs:
claude-review:
if: github.event.issue.pull_request && contains(github.event.comment.body, '@claude')
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
issues: write
steps:
- uses: actions/checkout@v4
- uses: anthropics/claude-code-action@v1
with:
use_bedrock: 'true'
prompt: |
Review this PR for code quality issues.
claude_args: |
--model eu.anthropic.claude-sonnet-4-5-20250929-v1:0
--allowedTools "mcp__github__get_pull_request,mcp__github__get_pull_request_diff,mcp__github__get_pull_request_files,mcp__github__get_pull_request_status,mcp__github__pull_request_read,mcp__github__create_pending_pull_request_review,mcp__github__submit_pending_pull_request_review,mcp__github__pull_request_review_write,mcp__github__add_comment_to_pending_review,mcp__github__add_issue_comment,Bash(gh pr view:*),Bash(gh pr diff:*),Bash(gh api:*),Grep,Read"API Provider
- Anthropic First-Party API (default)
- AWS Bedrock
- GCP Vertex
Additional context
- Model used:
eu.anthropic.claude-sonnet-4-5-20250929-v1:0 - Bun version: 1.2.11
The action clearly succeeded in its task (review comments were posted), but something in the cleanup or finalization phase returns exit code 5. This makes it impossible to use the action in CI pipelines without continue-on-error: true, which defeats the purpose of detecting actual failures.
Exit code 5 doesn't appear to be documented. Is this a known exit code? What does it signify?