Repository navigation
fix: use gh run watch instead of manual polling in pr-review Step 5 - #1246
Merged
Merged
Conversation
Replace the manual sleep/poll loop in pr-review Step 5 with `gh run watch`, consistent with the running-in-ci skill. Also skip CI monitoring entirely for self-authored PRs where the bot stays silent (no approval to dismiss). Evidence: run 22540574040 burned 43 poll iterations (~43 min) waiting for the benchmarks job on a self-authored renovate PR where the bot was going to stay silent regardless. Closes #1245 Co-Authored-By: Claude Opus 4.6 <[email protected]>
max-sixty
reviewed
Mar 2, 2026
| value. | ||
|
|
||
| After approving, wait for CI to finish using `gh run watch` (consistent with | ||
| the `running-in-ci` skill). Exclude the current workflow's own check to avoid |
Owner
There was a problem hiding this comment.
are we excluding the current workflow's own check this way?
Collaborator
Author
There was a problem hiding this comment.
Yes — at both stages:
-
gh run watchtargets a specific run found via--workflow ci.yaml, so it only watches the CI workflow, never the current review workflow. The exclusion is implicit by targeting a different workflow's run ID. -
The
statusCheckRollupverify step still has theselect(env.GITHUB_WORKFLOW == null or (.workflowName == env.GITHUB_WORKFLOW | not))filter, which explicitly drops the current workflow.
So it's actually slightly more robust than before — the old polling loop relied solely on the jq filter, while now the gh run watch step can't circular-wait by construction.
This was referenced Mar 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
sleep/pollloop in pr-review Step 5 withgh run watch(consistent with therunning-in-ciskill)Context
Nightly review of 8 Claude CI sessions from the past 24 hours found that the
pr-review skill's Step 5 guidance contradicts the running-in-ci skill:
running-in-cigh run watch(blocking, efficient)pr-reviewStep 5gh pr view --json statusCheckRollup+sleep 30-60sloopsSessions that followed
running-in-ci(dependabot PR reviews) used 0 polliterations. Sessions that followed
pr-review(self-authored PR reviews) used7-43 poll iterations. The worst case (run
22540574040)
spent ~43 minutes polling the benchmarks job on a renovate PR where the bot was
going to stay silent regardless.
Closes #1245
Test plan
test_command_pages_and_skill_files_are_in_syncpassesgh run watchinstead of manual polling🤖 Generated with Claude Code