Field notes
How to review agent-written pull requests
A tidy diff still needs checks for scope, behavior, APIs, permissions and tests that verify the requested change.
Reviewing human code, you learn where the danger is. The hasty commit at 6pm. The function that grew for two years. The place someone left a comment saying they were not sure about this.
Agent code has none of those tells. It is uniformly tidy, consistently formatted, and confident throughout. The failure modes moved somewhere else, and if your review habits did not move with them you will approve things you should not.
One: check scope before you read the code
The single highest-signal check. Read the task, then read the file list. Ask whether every changed file needed to change.
Agents interpret goals. Asked to fix a date formatting bug, an agent may also normalize timezone handling in three other modules, because it reads that as the real problem. Sometimes it is right. It is still a different change than the one that was reviewed, tested, and scheduled.
Two: verify the APIs exist
Agents produce plausible library calls. A method with the right name and the wrong signature, a config option that was removed two versions ago, a helper that exists in a different package entirely.
Types and tests catch most of this, which is exactly why it survives in the places they do not reach: dynamic config, string-keyed lookups, infrastructure definitions, and SQL. Check unfamiliar API calls and options against the version the project uses.
Three: read the tests as adversarially as the code
Check the tests for these four patterns:
- Assertions that restate the implementation. The test computes the expected value the same way the code does, so it passes for any behavior.
- Over-mocking. Every dependency stubbed, leaving a test that verifies the mocks were configured correctly.
- Deleted or weakened assertions. The failing check was the problem, so the check went away. Always read removed lines in test files.
- Happy path only. No empty input, no null, no error branch, no boundary.
The fix that scales better than vigilance: require a failing test first for bug fixes, and reject any pull request that reduces assertion count without an explicit reason in the description.
Four: hunt for silent behavior changes
Agents refactor while working, and refactors change behavior at the edges. The specific things worth grepping the diff for:
- Default values that changed.
- Error handling turned into a swallowed exception or a default return.
- Null and empty handling that became a truthiness check.
- Ordering assumptions introduced or removed.
- Timeouts, retries, and limits adjusted. These are load-bearing and they are edited casually.
The diff replaced a try block with an optional chain. Cleaner, shorter, and it turned a loud failure into a silent empty result.
Five: security review does not get skipped
Agents reproduce patterns from wherever they learned them, including the insecure ones. Specifically look for string-built SQL, permission checks performed in the client or in a prompt rather than server-side, secrets moved into code or config, expanded CORS, and validation that got relaxed to make a test pass.
For anything touching agent tools or credentials, the standards in prompt injection is not a prompt problem apply to the diff too. Capability changes deserve more scrutiny than logic changes.
Six: make the description do work
Require a template and treat a missing section as a review blocker: what was asked, what changed and why, what was verified and how, what was deliberately left alone, where the reviewer should look first.
If the description does not explain the change, inspect the diff and ask for the missing reasoning before approving it.
The checklist, in order
- Does the diff match the task, and nothing more.
- Do every new API call and option actually exist.
- Would the tests fail if the behavior were wrong. Were any assertions removed.
- Any changed defaults, error paths, null handling, ordering, timeouts, or limits.
- Any new query building, permission logic, secret, or relaxed validation.
- Is the diff small enough to have actually been read. If not, send it back to be split.
The structural fixes that beat vigilance
Reviewer attention is finite, so most of the win comes from constraints in the pipeline rather than from trying harder:
- Hard diff size ceiling per agent job type.
- Path allowlists so certain directories are simply off limits.
- Required deterministic checks including tests, types, lint, and your eval suite when behavior code changes.
- Merge-rate tracking per task type, so unproductive categories get retired instead of endlessly tuned.
The full pipeline setup, including sandboxing and token scopes, is in putting AI coding agents in CI. The tooling comparison for what generates these diffs in the first place is in Claude Code vs Cursor.
Generated changes still need review against the task, behavior and failure cases. If the prototype on the other side of that review still needs hardening, the path is in from vibe coding to a production system.
Frequently asked
How is reviewing agent code different from reviewing human code?
Human mistakes cluster around difficulty. Agent mistakes cluster around ambiguity. Agents write clean, confident, well-formatted code that sometimes solves a slightly different problem than the one you asked about, so review has to check intent before style.
What should you check first in an agent pull request?
Scope. Compare the diff to the task. Anything changed that the task did not require is the highest-signal warning you will get, because it means the agent reinterpreted the goal.
Do agents write bad tests?
They write tests that pass, which is not the same thing. The common failures are assertions that restate the implementation, mocked dependencies that remove all coverage, and a deleted assertion presented as a fix.
Should agent pull requests be smaller than human ones?
Yes, deliberately. One task, one pull request, with a hard diff ceiling. Large agent diffs are where reviewers stop reading carefully, and that is exactly where the subtle problems live.
Have a stalled product build?
I help founders turn stalled product builds into software ready for a real customer, pilot, or launch.
Show me what exists, what is stuck, and what needs to work. I take ownership of the implementation, test the agreed user journey, and document the handoff.
New field notes also go out on my newsletter. Subscribe on Substack.

Written by
Alex Cinovoj, TechTide AI
Founder & CTO, TechTide AI · CTO & Co-Founder, CPG Playbook. I’m based in Columbus, Ohio, and spent 13 years in IT across support, systems, cloud, architecture, and engineering, and the last 2 years on AI implementation. I’m a Lovable Senior Champion, an earned Discord community-support volunteer role, with 9 Anthropic Academy course completions. Logs over vibes. Production over theater.
More on Coding agents
Putting AI coding agents in CI
Give CI agents scoped credentials, isolated jobs and review gates. Check the diff and test results before merging.
Choosing an AI agent framework in 2026
Choose an agent framework by the state, restart behavior and handoffs your workflow requires.
The Claude Agent SDK in production
The SDK provides the agent loop. Your application still needs scoped tools, permissions, budgets, retries and tests.