Not Every Pull Request Deserves the Same Review: Scoring Merge Risk for Agent Work
When agents open 15 pull requests a day, treating a copy edit like a billing migration causes review fatigue. Score merge risk first.
Founder, Task Machine
It is 12:30 PM and your coding agents have opened twelve pull requests since breakfast. Five of them are harmless: a typo fix in a docs page, an icon alignment tweak, a couple of renamed helper functions. Buried at number nine is a 4-line edit to a Stripe webhook handler that silently drops a retry case.
If you review all twelve with the same line-by-line scrutiny, your afternoon disappears into code review. If you skim the queue to stay unblocked, number nine gets the same ten-second glance as the typo fix. That review fatigue is exactly how subtle production bugs slip straight past smart developers.
The fix is to stop treating pull-request review as an all-or-nothing choice between "read every line by hand" and "let agents merge freely." Separate risk assessment from merge approval, score every commit against a structured rubric, and spend your human attention where the blast radius actually lives.
Five questions that separate safe merges from risky ones
In Task Machine, every ready pull request runs through an automated Merge risk assessment before it reaches your Inbox, giving you an overall Low, Moderate, or High rating alongside a five-area breakdown right next to Approve and Request changes.

Instead of asking a model for a vague "looks fine" verdict, the rubric evaluates five concrete dimensions:
| Category | What it evaluates |
|---|---|
| Impact | How far a bug could reach: customer data, billing, authentication, shared infrastructure, or an isolated internal helper. |
| Verification | Whether the diff includes real tests or checks that would catch a mistake, or relies on untested assumptions. |
| Rollback cost | How hard it is to undo after landing: a clean git revert, or a destructive schema migration and external side effects. |
| Alignment | Whether the actual diff stays inside the requested task and approved plan, or introduces unrequested scope drift. |
| Error detection | If something goes wrong in production, how quickly you would notice (a loud crash versus silent data corruption). |
Two design choices make this rubric trustworthy in practice. First, application code computes the overall Low, Moderate, or High level from the category ratings, giving heavier weight to Impact, Verification, and Rollback cost so a poorly verified change to a sensitive path cannot hide behind clean alignment. Second, a single High rating in any category automatically disqualifies the pull request from policy auto-merge. A neat 3-line edit with a high rollback cost still waits for a human.
Why diff size and self-grading both fail
Most teams reach for one of two shortcuts when review volume spikes, and both break down fast.
The first shortcut is judging risk by diff size. As Google's Engineering Practices on small CLs and SmartBear's Cisco code review study highlight, smaller diffs are easier to inspect, yet diff size alone is a poor proxy for danger. A 400-line pull request adding unit tests or moving static copy is low risk. A 4-line edit altering a permission check, a database migration, or a payment calculation can take down production or corrupt customer data.
The second shortcut is asking the implementing agent "is this safe to merge?" inside the same session that wrote the code. An agent grading its own work produces optimistic summaries because it already believes its implementation is right.
An honest merge-risk assessment needs three guardrails:
- Independent read-only inspection: A separate assessor that cannot edit code, cannot approve the pull request, and cannot post comments on your Git host.
- Complete diff coverage: The assessor must inspect the entire pinned diff before submitting a rating so a long change cannot be skimmed and waved through.
- Exact-commit binding: Every rating belongs to one exact commit and target branch. Push a new commit, and the earlier risk score is immediately superseded.
Four gates for safe policy auto-merge
Once every pull request carries an honest, exact-commit risk assessment, you can let genuinely low-risk changes land automatically while keeping every consequential call in your Inbox.
In Task Machine, a pull request only passes automatic policy approval when all four gates hold at once:
- Project policy allows it: Your project has explicitly opted out of requiring human review on every pull request (human review stays on by default).
- Merge risk is clean: The assessment completed with an overall Low rating and zero categories rated High.
- Earned agent autonomy: The implementing agent is allowed to merge automatically at its current autonomy level.
- Not selected for a spot check: Even automatic agents receive periodic random spot checks routed to a human so drift never goes unnoticed.
If any single gate fails, the pull request routes straight to your Inbox with the exact reasons listed: whether the project requires human review, which risk category came back concerning, whether autonomy requires asking first, or whether it is a spot check. Completed reviews freeze their original assessment and commit snapshot in history so later commits never rewrite past decisions, and merge risk stays strictly decision context: even a High rating leaves the final yes or no in your hands.
Spend your review time on the PRs that actually carry risk. Get started with Task Machine or view pricing to run merge-risk scoring and policy-gated approvals in one Inbox, or read Pull requests and delivery for the full workflow.