AI Code Review Agents: How Teams Catch Bugs Before Merge With Claude Code and Copilot Evals

Coding agents made writing code cheap. Reviewing it did not get cheaper — it became the queue everything waits in. The response, through 2026, is a second layer of agents whose only job is to read pull requests before a human does: find the bugs, rank them, attach fixes, and leave the merge decision with people. This guide explains how those review agents work, how the Claude Code and Copilot setups differ, and — the part most teams skip — how to eval yours before you trust it.
01 / The bottleneck moved to review
When an agent can produce a feature branch in an afternoon, the constraint is no longer typing. It is the senior engineer with eleven pull requests waiting, each needing the same questions answered: does this break an edge case, does it leak data, does it change behaviour three files away? Human reviewers answer those questions well and slowly, and they answer them worst on the tenth PR of the day.
Review agents attack the queue, not the judgment. Their job is the first pass: read every diff completely, check it against the surrounding codebase, and hand the human a short, ranked list of things worth attention. Done well, the human stops hunting for problems and starts deciding about them. Done badly, the agent adds a second queue — a pile of confident, wrong comments someone has to clear. Which of those you get is mostly a measurement question, which is why this article spends its second half on evals.
02 / What a review agent actually does
Under the marketing, the serious review agents share a pipeline. A pull request opens, and the system reads not just the diff but the surrounding project — callers, tests, configuration — because most real bugs live in the gap between the change and its context.
Anthropic’s Claude Code Review makes the structure explicit: multiple specialised agents analyse the pull request in parallel, each looking for a different class of problem — logic errors, security issues, broken edge cases, regressions — and candidate findings then pass a verification stage that checks them against the actual code before anything is posted — the step that separates a reviewer from a comment generator, because it exists to kill false positives. Findings arrive tagged by severity, as line-level comments, and the check completes neutral — it does not approve or block the merge by itself. GitHub Copilot code review aims at the same first pass from the other direction: fast comments — usually under 30 seconds, per GitHub’s documentation — with suggested changes you can apply in a couple of clicks. In both cases the default is deliberate: the agent advises, humans approve.
03 / Two setups compared: Claude Code and Copilot
| Claude Code Review | Copilot code review | |
|---|---|---|
| How it starts | Enabled per repository for Team/Enterprise; triggers on PR open, every push, or manual request; also runnable via the GitHub Action | Request Copilot as a reviewer, like a person — or configure automatic review of all PRs |
| How it reads | Parallel specialised agents over the PR and surrounding codebase, with a verification pass | Agentic full-project context gathering; can also search related public repositories |
| Depth control | Review depth: Quick, Standard, or Deep; Anthropic cites ~20 minutes average review time | Review effort levels: Lite, Balanced, Max; reviews usually complete in under 30 seconds |
| How you steer it | Repository guidance for Claude Code, plus a policy file (.claude/approvals.yml) for the newer Approvals agent | .github/copilot-instructions.md for repo-wide guidance, path-specific instructions, and AGENTS.md |
| What happens after | Findings by severity; the companion PR Steward agent (beta) can address CI failures and reviewer feedback | Apply suggested changes in clicks, or hand a comment to Copilot cloud agent with “Fix with Copilot” |
| Merge authority | None by default — the check is neutral; Approvals can sign off only within a written policy, and Anthropic recommends starting in observe-only mode | None by default — Copilot reviews do not count toward required approvals unless you configure them to |
Since November 2026, Anthropic bundles its pieces as Claude Ship: Code Review (generally available) plus PR Steward and Claude Approvals in beta, with a /ship command in Claude Code for your own pull requests. Whichever stack you pick, note the steering row: both systems read standing instructions from the repository. A review agent without your conventions reviews like a talented stranger.

04 / An example review workflow, end to end
Here is a workflow a mid-size team can adopt without changing how anyone writes code: agent reviews first, CI verifies, humans decide.
Step 1 — Wire the trigger. For Claude Code outside the managed service, the GitHub Action is the common route: install the Claude GitHub App, then add a workflow that reviews each new pull request.
name: Claude Code Review
on:
pull_request:
types: [opened, synchronize]
jobs:
review:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/checkout@v6
- uses: anthropics/claude-code-action@v1
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
prompt: "Review this pull request. Prioritise correctness,
security, and regressions over style. For each finding give
the file, the line, and a concrete failure scenario."
Step 2 — Write the standing instructions. Put your review rubric where your agent reads it: what counts as blocking, which paths are sensitive (auth, billing, migrations), what to ignore (generated files, vendored code). Ten precise lines here remove more noise than any setting.
Step 3 — Let the agent go first. The author waits for the agent’s pass before requesting human review, fixes or rebuts each finding, and pushes. Reviewers open a PR that has already survived one sceptical reading.
Step 4 — Keep the human gate human. Required approvals stay with people. If you later experiment with policy-based auto-approval for trivial changes, run it in observe-only mode first — let it announce what it would approve, and compare against what humans did — before it can sign anything.
05 / Evals: measure your reviewer before you trust it
Vendor demos review a diff with one planted bug and catch it theatrically. Your codebase is not a demo. The only eval that predicts your experience is built from your own pull requests, with answers you already know.
Build a corpus of 15–25 historical PRs in three groups. First, bug PRs: changes that introduced a defect later fixed — the ground truth is the post-mortem or the fix commit. Second, planted-defect PRs: take clean historical changes and seed a few labelled bugs of the kinds you actually fear — an unchecked null, a missing permission check, a race. Third, clean controls: ordinary refactors and features with no known defect, where any finding is by definition a false positive. Keep the ground truth hidden from whoever runs the eval, and give every reviewer the same context a human would have had: the diff, the repo state, the tests.
Then score two numbers, and refuse to look at either alone:
- Recall = known bugs correctly identified ÷ known bugs. “Correctly” needs a rule: same file, at or near the line, naming the actual problem — not a vague warning in the neighbourhood.
- Precision = correct findings ÷ all findings. Its everyday form is false findings per PR: the number a developer must read and dismiss before reaching anything real.
A reviewer with high recall and low precision is a smoke alarm that sounds for toast: technically sensitive, practically ignored within a month. Classify every finding — correct and actionable, correct but low value, duplicate, false positive — because duplicates and nitpicks are noise too, just politer noise. Run the corpus blind, and run it twice: these systems are stochastic, and a reviewer that catches the bug on Monday and misses it on Tuesday has told you something important. Re-run the whole eval whenever the model, the depth setting, or your instructions change.
06 / The eval checklist
| Check | What “done” looks like | Why it matters |
|---|---|---|
| Corpus from your repos | 15–25 PRs across your main languages and services | Public benchmarks measure someone else’s code, not yours |
| Three case groups | Historical bugs, planted defects, clean controls | Each group exposes a different failure: misses, blindness, noise |
| Written ground truth | Every expected finding labelled with file, line, and issue | Without it, scoring becomes an argument |
| Fixed scoring rule | Same file, near the line, names the problem | Stops generous grading from inflating recall |
| Both metrics reported | Recall and precision / false findings per PR | Either number alone will lie to you |
| Severity weighted | Critical misses counted separately from nitpicks | Catching ten typos ≠ catching the auth bug |
| Duplicates counted | Repeated findings scored as noise | Three comments about one bug is still one bug |
| Blind, repeated runs | Reviewer sees no labels; corpus run at least twice | Measures the system you will actually live with |
| Cost and latency logged | Per-review price and minutes recorded alongside quality | A 20-minute deep review and a 30-second light one are different tools |
| Re-run on change | Eval repeated after model, depth, or instruction updates | Reviewer quality drifts silently otherwise |
07 / Rollout: trust, but sequence it
The teams that end up happy with review agents roll out in the same order. Start on one repository, in comment-only mode, with the eval corpus as your baseline. Watch two operational signals for the first month: how often developers act on findings versus dismiss them (the thumbs-up/down on Copilot’s comments exists for exactly this), and whether human review time per PR actually falls. Tune the standing instructions against the dismissals — most early noise is a rubric problem, not a model problem.
Only after the numbers hold should the agent’s role grow: re-review on every push, a deeper setting for sensitive paths, perhaps observe-only policy approvals for dependency bumps and docs. Keep it away from one thing regardless of scores: being the only reader of a change to auth, payments, or data deletion. Anthropic’s own documentation is blunt that its reviewer can miss bugs and vulnerabilities, and the same is true of every competitor. The goal was never a reviewer that cannot be wrong. It is a first pass that catches the ordinary bugs before merge, every time, at 2 a.m. — so the humans can spend their attention on the extraordinary ones.
