PR Babysitter
Every 15 minutes, inspect open PRs with a watch label: nudge reviewers, fix CI, rebase if behind main.
Kickoff prompt
/loop 15m Start the "PR Babysitter" loop.
Goal: open PRs labeled codex-watch are healthy (CI green, rebased, not stale).
Max iterations: 20.
Between iterations run: gh pr list --label "codex-watch"
Exit when: each watched PR is green and current, or escalated.
Step 1: List watched PRs. Fix CI once, rebase if behind, comment if stale. Escalate repeated failures.Basic information
Category
CI
Goal
open PRs labeled codex-watch are healthy (CI green, rebased, not stale).
Max iterations
20
Check command
gh pr list --label "codex-watch"
Exit when
each watched PR is green and current, or escalated.
Supported agents
Codex, Cursor
Steps
- 1
List watched PRs
List open PRs with the watch label. Skip merged, draft, or conflict-only PRs that need human product input.
gh pr list --label "codex-watch" --json number,title,mergeable,statusCheckRollup - 2
Triage each PR
For each PR: if CI failed, fix once; if behind main, rebase; if stale review, leave a short status comment.
- 3
Escalate blockers
Stop on merge conflicts needing product decisions or the same failure twice. Report blockers clearly.
More CI loops
CI Failure Watcher
Poll CI on an interval, investigate failures when checks go red, and push fixes until green.
PR Watch Loop
Poll open PRs labeled codex-watch every 15 minutes, review activity, and flag regressions or stale threads.
Fix CI Until Green
Fetch the latest failed CI run, reproduce the failure locally, fix it, and repeat until checks pass.
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.