Skip to content

claude-review blocks itself when triggered by claude[bot]'s own commit — permanent red required check on PRs after @claude addresses review #1299

@geniuskamo

Description

@geniuskamo

Describe the bug

The claude-review workflow run that is triggered by a commit pushed by claude[bot] itself fails with:

Action failed with error: Workflow initiated by non-human actor: claude (type: Bot).
Add bot to allowed_bots list or use '*' to allow all bots.

This is the action's own anti-loop guard refusing to run when triggered by its own previous invocation. The scenario is benign and intentional — Claude was invoked via @claude to address review feedback, made a commit, pushed it — but the result is a permanent red required check on the PR, because the downstream pull_request event that fired on the bot's push gets blocked by the same workflow's actor policy.

Repro

  1. Open a PR. Trigger Claude Code review with @claude in a comment.
  2. Claude reviews, identifies an issue, posts inline / top-level review comment.
  3. Reply @claude asking it to address the finding. The action commits and pushes the fix on the PR branch (Claude bot is the commit author / pusher).
  4. The push triggers a fresh pull_request event → claude-review workflow run.
  5. That run aborts with the "non-human actor" error. The PR is left with a failing required check that wasn't caused by anything substantive in the diff.

Concrete instance

Expected behavior

When claude-review runs on a pull_request event triggered by claude[bot]'s own push, the action should either:

  1. Skip silently with a passing status — log "triggered by claude[bot]'s own commit, skipping to avoid loop, prior review still applies" and exit 0. This preserves required-check enforcement without forever-red PRs.
  2. Allow the run when the bot is claude[bot] specifically (the action's own identity), via a default allow rather than requiring the repo owner to add it to allowed_bots.

Option 1 is probably safer (avoids actual loops if a future bot push would trigger different review content).

Workaround used in the meantime

Leaving the red check on the PR and treating it as a documented infrastructure-level override at merge time. This breaks the "required checks must be green" merge policy and forces a manual decision per affected PR.

Why this is not #1133 or #1284

  • #1133 is about allowed_bots bypassing the actor check but failing on checkWritePermissions for Copilot, resulting in a 404. Distinct error path.
  • #1284 is about checkHumanActor crashing with 404 for Copilot specifically. Distinct error path.

This issue is about the clean actor-policy refusal path for claude[bot] (no 404, no permission error — the policy itself blocks the run). Both linked issues are about Copilot's odd GITHUB_ACTOR value; mine is about the action's own bot identity.

Suggested code location

src/github/validation/actor.ts checkHumanActor — special-case claude[bot] (or the action's own bot login as resolved at runtime) to either silently pass or no-op the workflow.

Versions

  • Action: anthropics/claude-code-action@v1
  • Repository: public, individual-owned (geniuskamo)
  • Workflow file: .github/workflows/claude-review.yml in the affected repo

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