| name | babysit-pr |
| description | Owns a pull request until CI is green and review threads are cleared. Use whenever the user asks to babysit, fully babysit, monitor, or watch a PR or several PRs, however hedged ("I think we might babysit it", "can we babysit all 3 PRs?"). Any babysit phrasing runs the full autonomous loop; only explicit limiting language ("monitor only", "just watch", "don't push") runs the escorted loop. |
Babysit PR
Babysitting owns the outcome, not a single status check. It is not complete while any relevant check is failed or pending.
Delegate continuous monitoring to a cheap read-only sub-agent, preferably gpt-5.6-luna with high reasoning when available. Its responsibilities are CI status and review activity. The primary agent owns diagnosis, validation, and remediation.
Modes
Full mode — the default for every babysit request: "babysit", "fully babysit", "babysit the PR", "babysit PR #392", "babysit and resolve the threads", "babysit all 3 PRs", "file and babysit". Naming a PR, adding qualifiers, or hedging does not change the mode. Run the autonomous loop below; when several PRs are named, run the loop for each.
Escorted mode — only when the request contains explicit limiting language: "monitor", "watch", "keep an eye on", "just report", "don't push". Monitor and report; a push needs fresh authorization.
When the mode is ambiguous, use full mode. Restating "fix only valid, in-scope findings" is never required — that filter is built into the loop.
Monitor
Resolve the PR and record its current head commit, checks, reviews, and comments. Include existing unresolved review comments in the first status, then report new activity without repeating old items.
Watch:
- required and relevant CI checks for the current head commit;
- new reviews, review threads, and PR comments, including automated feedback after each push.
A new comment does not stop CI monitoring. Report it without judging whether it is correct or worth fixing.
Read threads from the reviewThreads GraphQL query, never from a bot's summary comment. A review that posts inline threads can also post a summary that mentions none of them.
Failed CI
A failed or cancelled check is an escalation, not completion:
- The monitoring agent reports the check name and link immediately and continues observing the remaining checks and review activity.
- The primary agent inspects the failure and determines whether it belongs to the PR. Compare the failing file against the PR diff before assuming ownership.
- Re-run a check once when the failure is a known or suspected flake and the failing test is outside the PR diff. A re-run is not a push. If it fails again, treat it as real.
- In escorted mode a new commit or push still requires fresh authorization; prepare the fix and request the single required push, and describe babysitting as waiting for authorization, never complete. In full mode, fix and push under the standing authorization.
- After a push changes the head, start a fresh monitoring cycle and continue until that head is green.
If the failure is external or cannot be fixed within the PR, report the concrete blocker and keep the state as blocked rather than complete.
Full mode: the loop
While this skill is active in full mode it supersedes the one-shot authorization rule, the no-automatic-review-fix-push rule, and the one-remediation-pass rule in AGENTS.md. Every other AGENTS.md rule still holds — in particular, never post PR comments or review replies.
A babysit request grants standing commit and push authority for each targeted PR until its loop ends.
Each round:
- Wait for CI and for review activity to settle on the current head.
- Triage every unresolved thread. A finding is a claim to validate, not an instruction to implement. Check it against the code, the repo's own docs, and official upstream documentation when it asserts an external fact.
- Fix the valid findings. Reject the invalid ones and record why.
- Run the repository's relevant checks before pushing, not after.
- Commit and push once for the round.
- Resolve the threads the round settled: those fixed, those rejected with reasoning, and those confirmed out of scope. Never resolve a valid finding that is still unfixed.
- Repeat.
The loop ends when the current head is green and the reviewThreads query returns zero unresolved threads.
Full mode: stopping early
Stop the loop and report, even in full mode, when:
- five rounds have run — report what is still open rather than continuing silently;
- a finding needs a product or design decision rather than a correct answer;
- a fix would exceed the PR's scope, or belongs to a file the PR does not touch;
- CI is blocked by something outside the PR.
A stop is a report, not a completion.
Completion
Finish only when every relevant check on the current head has passed or been legitimately skipped. Report that CI is green and state clearly whether any comments remain unresolved.
In full mode also report, per round: what was fixed, what was rejected and why, and anything deferred under a visible Out of scope heading.
Green CI with known unfixed defects is not success. Say so plainly when it happens.
Never say "babysitting complete" when CI is red or pending.
Boundaries
The monitoring sub-agent must not review the diff, evaluate comments, edit code, commit, push, post replies, or resolve threads. Return findings to the primary agent.
Never post PR comments or review replies. Resolving a thread is the only reply.
Babysitting in escorted mode must never become an automatic review-comment fix-and-push loop.