Code review struggles are the latest pain point of the agentic era, holding back productivity gains as coding agents produce changes more and more quickly. Some teams are bragging (confessing?) about 40,000-line pull requests, while others have simply stopped looking: "I don't even read the code anymore." Both are understandable reactions to the same problem: the human reviewer has become the slowest step in delivery.
The "obvious" fix is to speed up the review itself: leverage an AI reviewer, have humans review less of the code, accelerate approvals. I've tried versions of that on my own projects, and the AI reviewers I first wired in were noisy, blind or even litigious contract lawyers. However, what made the biggest difference was what happened before an agent wrote a single line of code. Two up-front practices did most of the work: deciding how much work goes into one unit (which drives the size of the PR) and grilling that unit of work before anyone starts coding.
Here I'll cover the up-front work that can help smooth out the review process.
The strain shows up at review
I'm not the only one seeing this. DORA's 2025 report describes AI as an amplifier: teams adopting it are shipping more, but their delivery is still getting less stable. Salesforce's engineering team wrote about a surge in AI-generated code that pushed pull requests past twenty files and a thousand lines, and they noticed that review time on the largest PRs stopped growing, which they read as reviewers no longer engaging deeply. A study of more than 33,000 agent-authored pull requests on GitHub found that the larger ones were less likely to be merged, with maintainers repeatedly asking for smaller changes.
None of this is surprising if you look at what review was ever good at. Long before agents, Microsoft Research found that although developers name finding defects as the main reason for code review, only a small share of review comments were about defects at all, and those were mostly local issues rather than design problems. Review was always a weak place to catch a misunderstood requirement or a badly shaped unit of work, and agents have made that much harder to ignore.
Size the work before you size the PR
The size of a pull request is decided long before it opens: it gets decided when someone groups stories into a unit of work and hands that unit to an agent. Project design was important before AI, and it's possibly even more important with AI coding agents.
Hand an agent an entire feature and you get the "40,000-line PR," an impressive pile of output that few reviewers can (or should) hold in their head at once. Slice the work too thin at the story level and you trade that for the opposite complaint: a queue of small PRs where each one is a context switch, and you give up the efficient, longer-horizon work that newer models have gotten genuinely good at. Neither extreme is always wrong. The challenge is breaking away from project design habits that have served teams well for years and giving this decision the deliberate thought it deserves. While some are starting to lean away from heavy, up-front spec work, I feel (and see) that understanding what the software must do is critical, both to agreeing with what the agent will produce and to running effective code reviews, AI and human alike.
The first question I ask when shaping a unit of work is a simple one: can a single reviewer understand this change, end to end, in one sitting? If the answer is no, the unit is likely too big, no matter how much the agent could handle. The second question is how the time the agent spends on a unit of work compares with the time a human spends reviewing it. That ratio is another challenge to overcome and test. If a unit takes the agent 4 hours to complete and a reviewer 2 hours to get through, review is already costing half as much time as the work itself, and every additional review cycle makes the imbalance worse.
There's no universal right size, but DORA's guidance on working in small batches is a useful sanity check. It warns specifically against massive AI-generated pull requests and suggests batches that can be completed in hours to a couple of days, calling anything that takes longer than a week to complete and check too big. That leaves more room than you might expect for the larger, agent-friendly units I'm describing, as long as each one is still something a reviewer can absorb. Where the sweet spot sits inside that range depends on the work and the reviewers, so each team will have to experiment.
Simply making the decision on purpose has been one of the highest-impact review improvements I've found, and it costs almost nothing.
Grill the unit of work, not the diff
As an architect, I've always tried to design around the fragile nature of software, which means knowing how it can break before it actually does. Somewhere in the rush to agentic coding, many teams may be skipping this part. The agent writes the plan, then writes the code, and the first time a human thinks hard about failure modes or faces the key technical decisions is during the review, when the code already exists and every finding guarantees rework.
Here's a concrete example. We allow deviations from our technical spec, which gives the agents some flexibility. On one project, we were getting hit with those deviations (each subject to approval) in the PR, which is too late in the process and scales only as far as the one person doing the reviews. By catching these deviations and other open questions up front, anyone operating the agent can get answers without dragging down the review process.
Grilling moves those questions and decisions to the front of the process. Before any code is written, the agent and I interrogate the proposed unit of work together: what's ambiguous, what's missing, what are the fragile points of this story, and where does it touch the seams of the system? Much of what a reviewer would have flagged later gets resolved right there, as a conversation instead of a rework cycle, at a point where changing direction is still cheap. The tooling for this is maturing quickly: Matt Pocock's grill-me skill interviews you relentlessly about a plan until every branch of it is resolved, and Anthropic's own Claude Code guidance recommends having the agent interview you about edge cases and trade-offs before it writes a spec.
There's a fair objection here. Up-front spec work can slide back into big-batch thinking, with developers waiting on documents before anyone writes a line of code, and Birgitta Böckeler has written that she'd rather review code than a pile of markdown files. I agree the waiting is a real cost. My counter is that you still need to know what you're building, and you need to understand (to an extent) how it's going to get built. That doesn't mean getting there alone: the AI can absolutely help you reach that understanding and draft those artifacts along the way. Mitchell Hashimoto calls his version of this bar the "whiteboard defense": he should be able to pull someone aside at any moment and have them explain, and defend, any customer-facing system they've shipped. He doesn't expect line-level familiarity with the code, only confident answers to questions like why one approach was chosen over another, what happens when an actor behaves maliciously, and where the system fails. He's just as clear that the bar is for customer-facing work; a proof of concept or a demo can be entirely generated and barely understood, which is also a good guide for how hard to grill a given unit of work.
There's a deeper reason to keep a human in this step. Newer models may well be better than we are at understanding a requirement, but if we don't understand what we're building, both technically and for the business, we're relying entirely on the model's understanding and have no way of knowing how it can break. The review at the end can only be as good as the understanding built at the start.
Then the review gets smaller
When the unit of work is the right size and the hard questions were answered before any code existed, the review has far less to do. That's the point where I want to strip it down further by handing everything mechanical to the machines and catching issues with a quality gate before the code even gets pushed.
The first layer is the checks we really should have been automating all along: unit and integration tests, end-to-end tests (where they actually offer value), static analysis, dependency and CVE scanning, and secret detection. These basic practices can shrink the scope of what human and AI reviewers need to cover in the code review.
I've also started using stricter linters that enforce the shape of the code, beyond just its style, such as size limits and boundaries that keep each feature slice in its lane. A few of my apps follow Feature-Sliced Design (FSD), which can be enforced mechanically rather than through costly human or AI inference.
These checks scale without getting costly or tired, and most (if not all) of them can be done with free and open-source software, so add them to your pre-push hook.
The second layer is an AI reviewer, and this is where I learned the most the hard way. The first ones I wired in ran blind, with the diff as their only frame of reference, so they either buried the PR in comments or re-litigated the same decisions on every pass. What fixed it was grounding: giving the reviewer the same technical design and spec the coding agent worked from, and telling it explicitly to skip anything the mechanical checks already cover. Getting the scope right took real tuning, and I expect it always will; it will absolutely differ from project to project and team to team. Tuning AI review agents should probably be part of the job description for tech leads and architects.
The last layer is a human, and I'm deliberate about what I ask of them. I still review my own side projects, but I'm looking at the shape of the change and the obvious mistakes rather than checking every line for correctness. On one PR, the agent created a Config class directly instead of injecting it the way the rest of the code already did. Nothing failed, no test caught it, and the code was fine in isolation; it just didn't belong in this codebase. At work, that seat goes to an opinionated technical lead who understands the business purpose of the code well enough to notice when something feels off, which is exactly the kind of intuition the tooling can't supply. That reviewer also has to resist the temptation to critique every database column name and type, which the up-front work should have caught anyway.
Old advice says the reviewer must be someone other than the author, but to scale, we need the developers operating the agents to be part of the review process. The developer must understand and approve what the agent created, run the mechanical checks and run the first pass of the AI reviewer.
Close the loop
A finding in review is a symptom, so the fix shouldn't stop at the PR. Every time a reviewer, human or AI, catches something, the question should be what would have prevented it: a new lint rule or test, a line in the guidance the agents read, a gap in the spec, or a question that belongs in the next grilling session. The Config class finding is a good example: I had never written down a design standard for dependency injection, so it will happen again. (I still haven't, so it definitely will.)
Approved deviations follow the same path. When a deviation from the spec gets approved, that ruling goes back into the spec so the next agent doesn't raise the same question and the next reviewer doesn't have to answer it again. Over time, the spec gets better at describing the system that actually exists, and the review has less to argue about.
The loop doesn't end at the merge button either. You will break something in production, so embrace that process too: run the postmortem, then feed what you learned back into the same places. That's what we should have been doing all along; agents just make the failures arrive faster, so the loop has to be tighter.
Finally, start where you are. If you're a product or platform company with a mature DevOps practice, most of the mechanical layer probably already exists and your problem is scale. Most teams aren't there, and agentic coding will overwhelm a weak DevOps practice quickly. That's why I'd be cautious when a lead reads about how the Claude Code team handles code reviews and wants to wire up the same thing on Monday. That approach works for them because of the tests, guidance and gates underneath it, and without those it mostly produces confident noise. The up-front work in this article is cheap by comparison, and it's where I'd start.

![[Herdr Hands-on] Building Kalamos: A Typora-style macOS Markdown Editor in 3 Days with Claude Code as PM, Parallel Development,](https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fewsvkw7u0trpf3fig3na.png)