Skip to content

Reviewing 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).

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.

StepQuestion answeredArtifact inspectedStarting budgetShort-circuit condition
1. Spec deltaDid the agent change only what was requested?Ticket/spec vs plain-sentence behavior delta2 minUnrequested behavior or missing spec → Return
2. EvidenceDoes every criterion have a passing check on HEAD?Evidence bundle, test outputs, screenshots/traces3 minUNVERIFIED criterion or stale SHA → Return
3. Risk flagsAre escalation paths touched or blockers open?Review-agent report and touched paths1 minEscalation class → Escalate; P0/P1 finding → Return
4. Oracle changesDid the PR alter what “green” means?Full diff of tests, snapshots, fixtures, CI, lint, type config3 minLoosened check without spec justification → Return
5. Sampled hotspotsDoes unread code hide something evidence missed?Up to 3 hunks chosen by rule before looking5 minReal defect → Return + add missing automated check
6. DecideApprove, return, or escalate?Notes from steps 1–51 minWrite 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.

Every review ends with an explicit verdict and rationale—never a bare “LGTM”:

VerdictRequired conditionsNext owner
ApproveSpec delta matches ticket; all criteria pass on HEAD; zero weakened oracles; zero escalation paths touched; sampled hunks raise no unanswered riskReviewer merges (or auto-merge runs) under staged delivery
ReturnUnrequested behavior, UNVERIFIED criterion, stale commit SHA, loosened oracle, open P0/P1 finding, sampled defect, or size budget exceededAuthoring agent gets exact failing items; cap at 2 human returns, then engineer takes over
EscalateAny escalation class touched, review agent contradicts evidence, unverifiable check cited, or unsettled architectural trade-offNamed 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, or neutral; 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 classQuestion the human code reader answers
Auth, permissions, tenancy, adminCan any caller access unauthorized data or actions?
Money: billing, payments, refundsIs every amount exact, rounded cleanly, and retry-safe?
Production schemas & migrationsIs it rolling-deploy-safe, idempotent, and reversible?
Public API, SDK, & webhook contractsWhich external client breaks, and was it declared?
Privacy, deletion, consent, & abuse controlsDoes 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 conflictWhat 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.

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.md and restrict output to P0–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 CODEOWNERS paths updated only through reviewed PRs.

Did this guide help you?

One tap, no sign-in.

not at all a lot