Reviewing an agent's pull request without reading every line
PLReviewing an agent’s pull request without reading every line uses six triage steps: check the specification delta, confirm head-commit evidence, scan risk flags, read every oracle diff in full, inspect three targeted hotspots, and record an approve, return, or escalate verdict. Developers and tech leads run this after an independent review agent completes the checklist.
Tuesday morning opens with nine agent pull requests waiting in your queue. The first spans 640 lines across 14 files, CI is green, and the description says “Implemented pagination as requested.” Reading every line consumes half the day; skimming blindly imports hidden regressions. Industry telemetry shows why line-by-line human checklists broke: DX measured median pull request size rising from 44 to 72 lines between July 2025 and June 2026 (DX, Justin Reock, June 2026), and Faros AI’s Acceleration Whiplash report (April 2026, telemetry from 22,000 developers) found median time in review up 441.5% alongside 31.3% more pull requests merging with zero review.
Moving from Level 3 (review diffs) to Level 4 (write specs) preserves every review check while changing who executes it: machines run deterministic gates and mechanical review checklists, while humans judge evidence, oracle diffs, and escalation boundaries (see evidence, not diffs).
The six-step triage protocol
Section titled “The six-step triage protocol”Execute the steps in strict order. Early steps fail fast so expensive attention lands only on pull requests that pass cheap gates. Budget roughly 15 minutes per pull request as a starting team policy; if a change cannot be triaged inside that budget, the change is oversized, under-evidenced, or belongs in an escalation class.
| Step | Question answered | Artifact inspected | Starting budget | Short-circuit condition |
|---|---|---|---|---|
| 1. Spec delta | Did the agent change only what was requested? | Ticket/spec vs plain-sentence behavior delta | 2 min | Unrequested behavior or missing spec → Return |
| 2. Evidence | Does every criterion have a passing check on HEAD? | Evidence bundle, test outputs, screenshots/traces | 3 min | UNVERIFIED criterion or stale SHA → Return |
| 3. Risk flags | Are escalation paths touched or blockers open? | Review-agent report and touched paths | 1 min | Escalation class → Escalate; P0/P1 finding → Return |
| 4. Oracle changes | Did the PR alter what “green” means? | Full diff of tests, snapshots, fixtures, CI, lint, type config | 3 min | Loosened check without spec justification → Return |
| 5. Sampled hotspots | Does unread code hide something evidence missed? | Up to 3 hunks chosen by rule before looking | 5 min | Real defect → Return + add missing automated check |
| 6. Decide | Approve, return, or escalate? | Notes from steps 1–5 | 1 min | Write explicit verdict + sampled hunks in PR comment |
For Step 5, pick two hunks by deterministic priority before opening the full diff (low-confidence reviewer flag; external-call error handling, retries, or timeouts; concurrency/state transitions; new dependencies or abstractions; unexplained diff hunks; largest non-test hunk) and choose the third file randomly via shell command (git diff --name-only main...HEAD filtered to non-test files piped into sort -R | head -n 1) so nothing inside the diff controls what gets audited.
Three verdicts and bounded return loops
Section titled “Three verdicts and bounded return loops”Every review ends with an explicit verdict and rationale—never a bare “LGTM”:
| Verdict | Required conditions | Next owner |
|---|---|---|
| Approve | Spec delta matches ticket; all criteria pass on HEAD; zero weakened oracles; zero escalation paths touched; sampled hunks raise no unanswered risk | Reviewer merges (or auto-merge runs) under staged delivery |
| Return | Unrequested behavior, UNVERIFIED criterion, stale commit SHA, loosened oracle, open P0/P1 finding, sampled defect, or size budget exceeded | Authoring agent gets exact failing items; cap at 2 human returns, then engineer takes over |
| Escalate | Any escalation class touched, review agent contradicts evidence, unverifiable check cited, or unsettled architectural trade-off | Named owner via CODEOWNERS |
Cap both human returns and automated review-fix loops. At Stripe, Minions agents are bounded to “at most two rounds of CI” across over 1,300 pull requests merged weekly (Stripe Engineering Blog, Alistair Gray, February 2026). A branch still failing after two returns usually suffers from an ambiguous specification rather than coding weakness—fix the criteria in acceptance criteria before retrying.
Automated AI-to-AI review loops need the exact same cap. In Anthropic’s engineering write-up on its own repositories (How the Claude Code team does code review, Addy Osmani, Morgan Westlee Lunt, and Qing Wang, October 2026—self-reported internal figures, not a universal benchmark), an unbounded review-fix loop ran over 50 rounds overnight with ~59% of later findings targeting pre-existing lines from round 1. Applying four controls—a three-round cap, diff-only re-review after pass 1, flagging bug classes instead of single lines, and no duplicate findings—reduced PRs needing five or more rounds from 8.9% to 1.5% and cut mean reviews to pass from 2.08 to 1.32.
Pair bounded loops with branch protection’s Require conversation resolution before merging rule so every automated review finding is either fixed in a subsequent commit or explicitly resolved with a written reason.
The review-agent checklist and escalation boundaries
Section titled “The review-agent checklist and escalation boundaries”Commit an evidence-demanding review checklist (e.g., .github/review/agent-checklist.md) owned by the tech lead in CODEOWNERS. Every item requires proof (file:line, command + exit code + HEAD SHA, or search result), excludes style nits unless style conceals a bug, ranks failures P0–P3, and ends with touched escalation paths plus a suggested verdict (review agents never approve or merge):
- Scope & context fit: Linked spec exists; every behavior change listed; follows local patterns without duplicating helpers or breaking public APIs.
- Correctness & data: Edge cases (empty, null, limits, timeouts), partial external failures, async lifecycles, retries/idempotency, and rolling-deploy-safe migrations verified.
- Oracle & security: Every test, snapshot, lint, type, or CI change classified
stricter,looser, orneutral; boundary validation, authz vs authn, zero secrets, and registry checks for every new package (dependency verification). - Reviewability: Changed non-generated lines within team size budget (e.g., 400 lines), UI screenshots/traces attached, and the single riskiest hunk named.
Escalation classes requiring human code reading
Section titled “Escalation classes requiring human code reading”Map narrow paths in .github/CODEOWNERS with Require review from Code Owners enabled; over-broad lists collapse back to Level 3:
| Escalation class | Question the human code reader answers |
|---|---|
| Auth, permissions, tenancy, admin | Can any caller access unauthorized data or actions? |
| Money: billing, payments, refunds | Is every amount exact, rounded cleanly, and retry-safe? |
| Production schemas & migrations | Is it rolling-deploy-safe, idempotent, and reversible? |
| Public API, SDK, & webhook contracts | Which external client breaks, and was it declared? |
| Privacy, deletion, consent, & abuse controls | Does personal data stay in policy and fail closed under attack? |
| Oracle files (tests, CI, lint, type config) | Does “green” still prove everything it proved yesterday? |
| Uncovered logic or evidence conflict | What missing check closes the gap, and who adds it? |
Running independent review agents across tools
Section titled “Running independent review agents across tools”Always invoke review agents in a fresh session isolated from authoring assumptions. In CI, load the checklist from the base branch, keep API and deploy secrets out of PR test jobs, and never run PR-authored hooks or MCP configs with privileged credentials.
- Claude Code: Run
/code-reviewlocally, commit rules inREVIEW.mdfor automated review, or run read-only CI passes (Claude Code review automation, Claude Code docs). - OpenAI Codex: Store rules in
AGENTS.mdfor@codex reviewon PRs or run non-interactive sandboxed reviews (Codex code review, Codex docs). - Cursor: Configure Bugbot via
.cursor/BUGBOT.mdand restrict PR Routing & Approval strictly to non-escalation paths (Cursor code review, Cursor docs).
Verifying triage accuracy and handling failures
Section titled “Verifying triage accuracy and handling failures”Track four monthly indicators per risk class (metrics frameworks): sample yield (rising → turn defects into automated checks), escape rate by verdict (rising → tighten escalation), return rounds (> 2 → fix specs), and review-agent precision (falling → prune noisy rules). Run npx @wondelai/harness-audit (Harness Audit) to confirm automated review configs and PR templates are active.
What breaks when triaging agent pull requests?
Section titled “What breaks when triaging agent pull requests?”- Style nits bury real bugs: Cap nits explicitly in
REVIEW.md/.cursor/BUGBOT.md/AGENTS.mdand restrict output toP0–P2. - Author and reviewer share blind spots: Use fresh sessions and a distinct model/vendor on escalation classes.
- Evidence cites an older commit: Require HEAD commit SHAs and trust CI over agent prose.
- Sampling collapses into skimming: Record the three sampled hunk locations in the verdict comment; count unrecorded PRs as unsampled.
- Returned PRs oscillate: Stop at two human returns (or three automated rounds) and rewrite the specification.
- Escalation swallows every PR: Enforce narrow
CODEOWNERSpaths updated only through reviewed PRs.
Official docs and next steps
Section titled “Official docs and next steps”- Official references: Claude Code docs, OpenAI Codex docs, and Cursor docs.
Did this guide help you?
One tap, no sign-in.
What will you do with it?
How did it read?
What got in the way? Pick any that apply
Your role?
Thanks. I read every answer. Michał Jaskólski
Did this guide help?
One tap each. Close whenever you like.
no sign-in