Code Review in the AI Era: Guardrails, a Copilot Trial, and a Tool That Reads Everything
Code review is different now. With AI writing a growing share of the code, pull requests touch more files and change more lines than they did two years ago. A careful engineer cannot do a good job on a 60-file pull request on a busy afternoon, and nobody should pretend otherwise.
At a regulated income-verification platform, I attacked that from three directions: a guardrail that keeps pull requests small enough to review, a hard look at what GitHub Copilot's AI review was really worth, and an in-house review tool that does the wide, tedious tracing before a human reviewer opens the diff. This is how each one went, including the experiment we switched off.
Hire Me
Pull Requests Outgrew the Reviewer
Coding agents made engineers faster at producing changes, and the changes got bigger. A reviewer facing a 40-file pull request reliably catches style and structure. What slips through is the expensive kind of defect: a feature that quietly does nothing, a field nothing upstream ever fills in, a change that breaks a caller in a repository nobody thought to open, a deploy that has to happen in a set order, sensitive applicant data ending up in a log.
Those misses are not a discipline problem. They are a scope problem. Catching them means reading code across several repositories, checking what the ticket actually asked for, and tracing whether data really arrives where the new code reads it. That is hours of work per pull request, so in practice nobody does it every time. More code per pull request makes the gap wider every month.

Guardrails for Big PRs
The cheapest review improvement is a smaller pull request. I defined a Big PR for the engineering team as one that crosses any of these limits, ignoring generated and temporary files:
- More than 30 code files or 1,000 lines of code changed.
- More than 30 test files or 1,500 lines of test code changed.
The check lives inside the review tool described below. Each repository opts in with a small size config, and when a pull request crosses a limit the review asks the engineer to break it into stacked pull requests, each one under the limits. It is advisory on purpose: it never changes the review verdict, and a label covers the rare change that genuinely cannot be split. The point is to make "please split this" the default conversation instead of a favor a reviewer has to ask for.
The size limit is one line in a wider development standard I wrote for AI-assisted work. Two more lines from it carry most of the weight on pull requests:
- AI writes the code, and the engineer is accountable for it. Every line in a pull request belongs to the engineer who opened it, exactly as if they had typed it.
- The standard is simple: if you can't explain what changed, why, and how you know it works, it doesn't get a PR. AI is an implementation tool, not the solution designer.
The Copilot Max Trial
The team already paid for GitHub Copilot, so engineers used its automated code review on their pull requests. My experience matched theirs: the standard Copilot review is fine, and most of the time it adds comments the author has to sort through before getting to anything useful. It sees very little context around a pull request, and that shows in what it finds.
The first alternative I evaluated was Claude Code's /code-review. What ruled it out was cost, and context was a problem there too. I found it charged Anthropic API per-token rates instead of running on the Claude Team seats we already paid for, and one small pull request cost over $21 to review. The company's AI guardrails block API usage outright, so a review that bills by the token was never going to be the team's daily tool.
At the end of October 2026, GitHub added a Max effort level to Copilot code review. More context and more thinking is exactly what the standard review was missing, so I ran a real test: I turned Max on for our most active repository, about 20 pull requests a day, and weighed what it cost against what it found.
Then I interviewed engineers at every level who had worked with it. The verdict was consistent. Max did find a few real issues. It also produced more noise - more comments that did not apply - and it was slower and cost more, both in money and in the time engineers spent triaging its output. Even on Max, the biggest problem was the one I started with: lack of context. It reviewed the pull request without the things a reviewer on our team reaches for - the ticket, the product requirements, the other repositories the code talks to. Not worth it. We turned it off.
The lesson was not "AI review does not work." It was that a reviewer, human or AI, is only as good as the context it reads, and that every false alarm teaches people to skim the next comment.

A Review Tool That Reads Everything
So I wrote our own. The pull request review tool runs on an engineer's machine on Claude Code and does the expensive review on demand, usually in 6 to 12 minutes. I designed and built it myself and shipped it in the team's AI developer kit, where any engineer installs it with two commands. Early adopters on the team shaped it with feedback from real pull requests.
It works only with Claude, and it runs on the Claude Team seat of the engineer who starts it - not an enterprise contract and not API tokens, which the company guardrails block. Every plugin in the developer kit works the same way, so a review adds nothing to the bill beyond the seat the engineer already has. An engineer who hits the plan's usage limit waits out the reset period and runs it again.
It reads a change the way a thorough senior engineer would, if that engineer had unlimited patience:
It merges the current main branch into a throwaway copy first, so it reviews what would actually land, then reads every changed file in full, the code that calls it, the code it calls, and the history of the changed lines.
It reads the linked tickets, their sub-tasks and the parent epic, and gives every acceptance criterion its own row: met, partly met, not met, or could not be checked. With no ticket, it says so instead of making requirements up.
It searches the team's other repositories, the legacy ones included, for anything the change could break, checks pull requests this one depends on, and traces whether the data the new code reads is really produced upstream.
Scans for passwords and keys across every commit on the branch, and for tax, health and personal data (FTI, ePHI, PII) reaching a log, an analytics event, an error message, an AI prompt or an outside vendor. It ends in its own verdict: BLOCK, FIX BEFORE MERGE or PASS.
It reads CI results and failure logs, plus every comment already on the pull request - including Copilot's - and answers each open one: agreed, disagreed with the code that shows why, already fixed, or out of scope.
A written list of past misses is read before every review, so a mistake made once is looked for every time after. Earlier reviews of the same pull request tell it what was fixed, what is still open and what is new.
Then a second, independent session tries to prove each finding wrong. It never saw how the first review reached its conclusions, so it cannot simply agree with them. Findings it disproves are dropped, and anything new it finds is added. That step is what keeps people reading the output.

Where the Context Comes From
Lack of context was the biggest weakness of every AI review I tried, so context is what this tool is built around. Before Claude forms an opinion about a change, the tool collects what a careful reviewer on our team would go and find: the requirements, the conversations, the history, and the other repositories the code touches. Most of it is gathered by a script rather than left to the model, so it cannot be skipped. Everything is read, never changed.
This is every place it looks, and what each one adds to the review:
| Where it looks | What it reads | What that adds to the review |
|---|---|---|
| The pull request | Title, description, labels, every automated check, and the failure log of any check that failed. | The code is judged against what the author said it does, and a red build gets an explanation instead of a shrug. |
| Review comments already there | Every thread and comment from people and from Copilot, open or resolved. | Each open comment gets an answer, so the author is never handed the same point twice or left guessing which ones matter. |
| The code, as it would merge | The change merged with the current main branch, every changed file in full, the code that calls it and the code it calls. | Finds the bugs that sit outside the diff, and the conflicts with work that landed after the branch was cut. |
| Git history | Who changed the affected lines, when and why, plus every commit on the branch. | Shows why a guard existed before someone removed it, and catches a password added in one commit and deleted in the next. |
| Jira | The ticket that drives the work, its sub-tasks and parent epic: description, attachments, comments and links. | One row per acceptance criterion - met, partly met, not met, or could not be checked - so "done" means what the ticket asked for. |
| Confluence | The original product requirements, research, competitor analysis, the epic, the roadmap, the MVP and the end goal. | The change is weighed against where the product is going and the scale it has to reach, not only against one ticket. |
| Slack and email | Conversations that mention the ticket number or discuss its topic. | Picks up the decision that was made in a thread and never written back to the ticket. |
| Google Drive | Files related to the ticket. | The supporting documents the ticket points at become part of the requirements the code is checked against. |
| Other GitHub repositories, legacy included | Every company repository cloned on the engineer's machine, refreshed first and searched on its main branch for callers of what the change alters and producers of the data it reads. | Finds the break in a repository nobody thought to open. For us that meant the legacy repositories too: new code that reads from or feeds a legacy system is checked against the legacy source. The report says how many repositories it searched and names the ones it could not. |
| Pull requests this one depends on | Each pull request the change refers to, and whether what it promised is really on the main branch yet. | A hidden merge-order dependency becomes a plain "land that one first" instead of a production surprise. |
| Installed libraries | The source of each outside package the changed files import, at the version actually installed. | A claim about what a library does is read from the library, not guessed. |
| Repository standards | The Big PR size config, the team's list of agreed names for shared concepts, and the pull request template. | Asks for a split when a change is too big, and flags a second name for a concept that already has one. |
| Security scanners | Scans for passwords and keys, for secret settings that would reach a browser, for regulated data leaving its lane, and public vulnerability databases for any package added or upgraded. | The security verdict rests on tool output, not on a model's impression. A package nobody could audit is reported as unaudited, never as safe. |
| Its own memory | The written list of past misses, and the earlier reviews of the same pull request. | A mistake made once is looked for every time after, and a re-review says what was fixed, what is still open and what is new. |
| The engineer | The ticket and the problem being solved, when the engineer names them, and any pushback on an earlier finding. | The review starts from the author's intent, and a disputed finding gets a targeted re-check instead of an argument. |
More context means a more thorough review, and a more valuable one for the engineer who wrote the code. A finding that cites the ticket, the calling repository and the exact line is something the author can act on. A generic comment is something the author has to triage.
When a source is not available, the review does not stop and does not pretend. The report says what it could not see - a repository that is not cloned, a ticket it could not read, a scanner that is not installed - so nobody mistakes a narrow review for a clean one.
Where the Findings Land
- On the Pull Request, Line by Line
One short summary comment carries the counts, the verdict and a must-fix list. Each finding is its own resolvable thread on the line it is about, the same way Copilot's reviewer works, and a small self-contained fix comes with a one-click Commit suggestion button - offered only after the tool proves it is replacing exactly the right lines.
- Review, Fix, Re-Review
After fixes, a re-run reviews only the new commits in 3 to 5 minutes and accounts for every earlier finding: resolved, or still there and where. Running it on unchanged code costs nothing and shows the last review. A false alarm the independent check disproved stays disproved.
- Before the Pull Request Exists
An engineer can run it on unfinished work and get a readiness verdict, the cheapest moment to find a problem. The early report ends with a table, written by the tool rather than the model, of what a reviewer will have that this check did not - the ticket, CI, reviewer comments - so a "ready" can never hide missing requirements.
- Never an Approval
The tool never approves a pull request. Approval stays with people. Each run leaves a record pinned to the exact commit it reviewed, so QA and leadership can confirm a pull request was reviewed - and that it was this code - without re-running anything.
What It Caught, and What It Costs
- On a portal pull request, a defect that would have signed every portal user out at login. The change called a service that existed only on an unmerged branch of another repository. Nothing in the pull request itself looked wrong; the tool found it by searching the other repository.
- An early version missed a feature that compiled, passed its tests and did nothing at all, because the data it read was never filled in upstream. That miss is why the tool now traces data back to where it is produced, and why every review reads the list of past misses.
- On real pull requests it found problems Copilot did not, and the reverse. That is why it reads Copilot's comments and answers each one instead of competing with them.
- The tool itself carries 3,207 automated self-checks that run in seconds without spending anything, so it can be changed with confidence and its documentation is held to what the code actually does.
| Kind of run | Time | Cost |
|---|---|---|
| Standard review (the default) | About 6 to 12 minutes | About $8 to $20 |
| Re-run after fixes (new commits only) | About 3 to 5 minutes | A fraction of a full review |
| Re-run on unchanged code | Seconds | $0 |
| "Ultra" - many independent AI reviewers, for high-stakes changes | Longer | 7 to 9 times a standard review |
Costs are what the same work would cost at API prices, measured on real pull requests; the team runs it on its Claude Team subscription. The order of priorities is speed, then thoroughness, then cost.
Does an AI Review Replace Human Code Review?
No. It replaces the mechanical first pass - tracing edge inputs, finding untested behavior, catching broken contracts and known traps - so the human reviewer starts from a verified list instead of a blank diff. People still decide whether the change should exist, whether the design trade-off is right, and whether the team wants to own the code.
A single run is a sample, not a verdict: two runs of an early version on the same pull request once found almost entirely different things. That is why every run has an independent second check, why "no findings" counts as weaker evidence than "findings, checked and resolved", and why an engineer who disagrees can ask for a targeted re-check of one claim instead of arguing from memory. When the engineer is right, the lesson goes on the list of past misses.
What Leadership on This Looked Like
Three calls mattered. Setting a size limit and making it the tool's job to ask for a split, so no reviewer had to be the bad guy. Running the Copilot Max trial as a real experiment - one busy repository, interviews at every level, cost against value - and being willing to turn it off when the evidence said so. And building the review tool around the questions that actually cost us money, instead of the questions an AI finds easy to answer.
Two more lessons belong next to those calls:
- Claude Code's
/code-reviewdid not work for us on cost, and context was a problem as well. On a 5-file pull request with roughly 90 changed lines - 3 of those files and 60 of those lines were documentation - the review cost over $21, took a very long time, and what it found was noise. - The guardrail and the standard ended "anyone with Claude can commit". The guardrail: AI writes the code, and the engineer is accountable for it. Every line in a pull request belongs to the engineer who opened it, exactly as if they had typed it. The standard: if you can't explain what changed, why, and how you know it works, it doesn't get a PR. AI is an implementation tool, not the solution designer. Together they kept non-technical people from using Claude to do something without understanding what it does or what the consequences are. Having access to the repository does not mean you should be telling Claude to modify product source code, no matter how simple you think the change is.
I took a different route for the RJL team: a panel of narrow review agents with a separate verifier, and I am giving the prompts away. Read the multi-agent code review case study for the architecture and the free prompts, or see who owns the merge when agents open the pull requests.