From 90670cc1557d3a1af868ae3c9778bdff179cb27c Mon Sep 17 00:00:00 2001 From: Eric Andrechek Date: Tue, 12 May 2026 09:15:09 -0400 Subject: [PATCH] fix(ci): don't let Claude's own comment cancel the in-flight review run `cancel-in-progress: true` meant the issue_comment fired by Claude posting its sticky review comment cancelled the still-running pull_request workflow that posted it. The new run gets filtered out at the job-level `if:` (comment isn't @claude or /review) so it skips, but only after taking out its parent run on the way in. Make cancel-in-progress conditional on the new event's sender not being a Bot. Human pushes / human /review comments still cancel stale runs as before; Claude's bot comment (or any other bot comment that would have been filtered anyway) now lets the in-flight run complete. Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/claude-review.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/claude-review.yml b/.github/workflows/claude-review.yml index 0d1ab48a..76873298 100644 --- a/.github/workflows/claude-review.yml +++ b/.github/workflows/claude-review.yml @@ -70,11 +70,16 @@ on: type: string # Dedup per PR. PR number reachable from each event payload before -# any step runs. `cancel-in-progress: true` means a fast-follow push -# replaces an in-flight review with one against the new HEAD. +# any step runs. Fast-follow human action (new push, /review comment) +# cancels an in-flight review against the now-stale HEAD. Bot-triggered +# events do NOT cancel — otherwise Claude's own sticky comment fires +# an `issue_comment created` webhook that would cancel the in-flight +# review-run as it's still finishing posting. The new bot-triggered +# run is filtered out at the job-level `if:` anyway, so making it +# non-cancelling here just lets the original run complete. concurrency: group: claude-review-${{ github.event.pull_request.number || github.event.issue.number || inputs.pr_number || github.run_id }} - cancel-in-progress: true + cancel-in-progress: ${{ github.event.sender.type != 'Bot' }} jobs: review: