DEV Community

Riven Desk
Riven Desk

Posted on

STOP conditions I use before merging an AI agent PR

A 10-minute review bar tells you how to look. STOP conditions tell you when to stop looking and refuse the merge as written.

I wrote the timed review here: I stopped rubber-stamping AI PRs — here's the 10-minute review bar I use. The short checklist is here: How I review AI agent PRs in 10 minutes.

This post is the hard edge: concrete conditions where I reject, ask for a split, or ask before continuing — even if CI is green and the agent summary sounds confident.

What a STOP condition is

A STOP is not a style nit. It is a pre-agreed line that ends the current review path.

For each one I pick one of three outcomes:

  • Reject / request changes — the PR can stay one unit, but it must change before merge.
  • Split — the work is too mixed; ship the intent first, park the rest.
  • Ask — I do not have enough written intent, ownership, or rollback story to decide alone.

If a condition fires, I do not “finish later and LGTM.” The STOP is the decision.

STOP 1 — Blast radius with no written plan

Fire when: a large file set changed across modules or layers, with no short plan in the ticket or PR explaining why that radius was required.

Continue only if: a human wrote the boundary — e.g. “touch A and B; leave C; no lockfile.”

Outcome: Ask for the plan, or split into the minimal fix plus follow-ups. Unplanned multi-file agent work is where drive-by renames hide.

STOP 2 — Mixed concerns in one “quick fix”

Fire when: app logic, lockfile/dependency churn, and infra (CI, deploy, secrets wiring) land together under a small-fix title.

Continue only if: each concern is necessary for the same intent and rollback is still one revert — rare for true quick fixes.

Outcome: Split. Dependency bumps deserve their own attention; burying them next to a bugfix is how rubber-stamping happens.

STOP 3 — “No behavior change” while the surface moved

Fire when: the summary says refactor-only / no behavior change, but types, routes, public APIs, flags, or error contracts moved.

Continue only if: the PR lists the external surface that changed and how callers stay safe — with tests or a migration note.

Outcome: Reject the claim language and request changes until the description matches the diff. Summary theater is merge-blocking when it contradicts the file list.

STOP 4 — No one-sentence rollback story

Fire when: you cannot say how you undo this at 2am: single revert, documented forward fix, or explicit irreversible step with a plan.

Continue only if: the change set is coherent, or irreversible pieces (migrations, permission flips) have a written plan in the PR.

Outcome: Ask for the rollback sentence before approve. Agent PRs often lack the mental model you would have authored yourself.

STOP 5 — Security-sensitive paths you only skimmed

Fire when: auth, sessions, permissions, payments, secrets, shell/filesystem, templated commands, or new outbound network calls changed — and you only skimmed those hunks.

Continue only if: you read them (or parked them), with at least one failure/abuse check for the sensitive bit.

Outcome: Ask for time or a second reviewer, or reject until the hotspot is isolated. Ten-minute review is not a license to wave past auth.

STOP 6 — Tests that would not catch the bug returning

Fire when: CI is green, but tests only assert something returned,” noisy snapshots, or paths that fail solely if the function is deleted.

Continue only if: at least one assertion would fail on the regression you care about — ideally a negative or edge path from the human intent.

Outcome: Request changes. Weak tests make green feel like permission.

STOP 7 — No owner for the follow-up

Fire when: the PR crosses team or on-call boundaries and nobody is named for if this misbehaves Monday.”

Continue only if: an owner (person or rotation) is explicit in the PR or ticket.

Outcome: Ask. Agents do not own production; humans do.

How I apply these

I run them early, during the file-list / hotspot pass — not after half an hour of line comments. When one fires, I name it in the review: which STOP, reject vs split vs ask, and the smallest evidence that clears it. Same language for juniors and seniors.

No fake “bugs down X%” metrics. The point is fewer merges you cannot explain, and fewer 2am archaeology sessions on agent-authored blobs. If a PR cannot clear these STOPs, that is useful signal: narrower intent, a written plan, a split, or a deeper review — not a faster approve.


I packaged the checklist, Cursor-oriented rules, and review prompts I use into a small AI Agent Code Review Kit ($29): https://chopragunji.gumroad.com/l/nxoboi

For a second set of eyes on one difficult agent PR, the Agent PR Audit is here: https://chopragunji.gumroad.com/l/byoyi

— Riven Desk

What STOP conditions do you treat as merge-blockers on agent PRs? Worst drive-by you caught (or wish you had) — drop it in the comments.

Top comments (0)