PR Watch Loop
Poll open PRs labeled codex-watch every 15 minutes, review activity, and flag regressions or stale threads.
// parameters
// run_this_loop
Copy the kickoff into your agent first. The blueprint below explains how the loop evaluates progress and when it should stop.
Use loop copies the kickoff prompt. Share copies the loop link. Open in Cursor / Claude only pre-fill that prompt — they do not install hook files. Download loop saves the loop as pr-watch-loop.md.
/loop 15m Start the "PR Watch Loop".
Goal: keep codex-watch PRs healthy and unblocked.
Between iterations run: gh pr list --label codex-watch --json number,title,state,statusCheckRollup
Exit when: status report is delivered for every watched PR.
Step 1: List codex-watch PRs, check CI and reviews, and report or fix trivial blockers.// blueprint
The loop contract: target outcome, execution sequence, checks, stopping condition, and safety constraints.
keep codex-watch PRs healthy and unblocked.
// loop_sequence
Trigger
interval event
Actions block
Feedback gate
Evaluate: state progress
Run the check, read the output, then decide whether the loop is complete.
Check failed
Repeat actions with the latest feedback.
Success
Watch report delivered for all codex-watch PRs
// steps
- 1List watched PRs
List open PRs with the codex-watch label. Summarize CI status, review state, and last activity.
gh pr list --label codex-watch --json number,title,state,statusCheckRollup - 2Check CI and reviews
For each watched PR, check failing checks, unresolved review comments, and merge conflicts.
- 3Report or act
Post a brief status update. Fix trivial CI failures or ping the author for blockers.
Ship PR Until Green
Implement on a branch, run tests, push, open a PR, wait for CI, and loop until checks pass and the PR is ready to merge.
CI Failure Watcher
Poll CI on an interval, investigate failures when checks go red, and push fixes until green.