Back to loops
CIinterval

PR Watch Loop

Poll open PRs labeled codex-watch every 15 minutes, review activity, and flag regressions or stale threads.

0 views0 usesby solo lemon.

// parameters

Triggerinterval
Max iterations10
Exit conditionWatch report delivered for all codex-watch PRs

// run_this_loop

Copy the kickoff into your agent first. The blueprint below explains how the loop evaluates progress and when it should stop.

Open in CursorOpen in Claude

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.

Goal

keep codex-watch PRs healthy and unblocked.

// loop_sequence

// loop_sequence_diagram.json
closed loop

Trigger

interval event

Actions block

3 steps
1List watched PRs
2Check CI and reviews
3Report or act

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

Safety capMax 10 iterations

// steps

  1. 1
    List 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
  2. 2
    Check CI and reviews

    For each watched PR, check failing checks, unresolved review comments, and merge conflicts.

  3. 3
    Report or act

    Post a brief status update. Fix trivial CI failures or ping the author for blockers.