Building a Production AI Code Review Agent with High Engineer Acceptance

doordash · Tech · 2026 · source Agentic: yes · promotional bias: low · source-backed · extracted with prompt 0.5.4 (schema v2)

Generated from extraction.json — do not edit by hand. Every claim cites verbatim source evidence; stated means the quote directly asserts the claim, implied means it supports it indirectly.

Problem

Domain: Production AI code review for large engineering organizations

DoorDash needed an AI code reviewer that engineers would trust enough to act on, while catching critical cross-boundary, deletion, and silent-behavior issues that human reviewers predictably skim.

Constraints:

Architecture

DoorDash's third-generation review system uses a lead scout to scan the diff for suspicious leads, then two deep reviewers verify only the leads that deserve investigation. It routes each PR to per-domain review profiles mined from AGENTS.md, historical PR reviews, Slack decisions, and incidents, runs with full repository access in remote VMs, applies a disprove-it pass before posting, and can hand review findings to a fixer agent that patches the PR in an isolated worktree.

Diagram confidence: explicit (topology described by the source).

flowchart LR
  pr-trigger[PR trigger] --> lead-scout[Lead scout]
  lead-scout --> deep-reviewers[Deep reviewers]
  deep-reviewers --> review-profiles[Review profiles]
  deep-reviewers --> remote-repository-vm[Remote repository VM]
  deep-reviewers --> disprove-it-pass[Disprove-it pass]
  disprove-it-pass --> reporter[Reporter]
  reporter --> github-pr-thread[GitHub PR thread]
  github-pr-thread --> fixer-agent[Fixer agent]
  fixer-agent --> remote-repository-vm
  eval-set[Eval set] --> review-profiles
  eval-set --> deep-reviewers
Drag to pan · scroll or use +/− to zoom · reconstructed from the source's described component topology

Components

Component Role Interacts with
PR trigger Webhook or manual invocation that starts review when a pull request opens. Lead scout
Lead scout First-pass agent that notices suspicious diff locations and emits investigation leads without verifying them. PR trigger, Deep reviewers
Deep reviewers Verifier agents that investigate lead-scout findings with full PR and repository context. Lead scout, Review profiles, Remote repository VM, Disprove-it pass, Reporter
Review profiles DoorDash-specific review doctrine mined from documentation, past reviews, Slack decisions, and incident history. Deep reviewers, Eval set
Remote repository VM Full repository checkout and tooling environment used to trace callers, siblings, tests, and dependencies. Deep reviewers, Fixer agent
Disprove-it pass Explicit falsification step that drops any finding that cannot survive scrutiny. Deep reviewers, Reporter
Reporter GitHub comment generator with guardrails against false-clean, stale, duplicate, or unactionable comments. Disprove-it pass, GitHub PR thread
GitHub PR thread Surface where engineers see findings and can tag the agent for fixes. Reporter, Fixer agent
Fixer agent Agent that uses review context to patch the PR in an isolated remote worktree. GitHub PR thread, Remote repository VM
Eval set Small development loop built from real review misses and high-severity incidents. Review profiles, Deep reviewers

Data flow

A PR opens and triggers a review. The lead scout reads the diff and emits investigation leads. Deep reviewers load only the relevant review profiles for the touched domain, inspect full-repository context in a remote VM, trace callers and sibling implementations, falsify candidate findings, and send grounded findings to a reporter. If a human or AI comment needs a fix, the fixer receives the original review context, changes the branch in a remote checkout, and pushes a normal PR diff.

4 supporting quotes
“v3 added the lead scout in front of the reviewers, and this is the change that mattered most. The lead scout's job isn't to verify anything. It just reads the diff and notices things that feel off: "this deletion looks suspicious," "this enum case isn't handled in the sibling file," "this”article, stated
“deletion looks suspicious," "this enum case isn't handled in the sibling file," "this error path is silently swallowing failures." It produces a list of investigation leads. The two deep reviewers then take those leads and dig in, verifying the ones that hold up and dropping the ones that don't.”article, stated
“When a PR touches the payment-service-provider gateway, the agent loads the PSP rules, the payment core rules, and the monetary-security rules, and nothing else. A PR touching the consumer feed gets a completely different set.”article, stated
“The fixer runs in a remote VM with a full checkout of the repository and the original review context: the PR diff, the finding, the surrounding code, and the suggested direction.”article, stated

Why this architecture

DoorDash optimized for trusted, precise comments rather than broad recall. Splitting noticing from verifying focuses attention on suspicious code, review profiles load only the doctrine that matters for a change, full-repo remote execution gives reviewers the context humans use, and the disprove-it pass keeps speculative comments out of the PR.

4 supporting quotes
“They're focused on the handful of places where something might actually go wrong, with the rest of the change as supporting context. That focus is what lets them go deep enough to find architectural issues that v2 was missing.”article, stated
“code review agents don't fail only because models make mistakes. They fail because they spend attention poorly and spend trust too quickly.”article, stated
“We went the other way. Before any comment is posted, it has to survive a disprove-it pass, an explicit step where the system tries to falsify its own finding. If the claim can't hold up to scrutiny, it gets dropped.”article, stated
“The agent reviewing a fraud-detection change is, effectively, a different reviewer than the one looking at a pricing change”article, stated

Models used: LLMs · code review agents · coding-agent harnesses · model-agnostic providers

Scale

Alternatives considered (roads not taken)

Fan out to narrow specialist reviewers

Rejected because: Specialists caught mechanical bugs but missed architectural and cross-boundary issues because none saw the full picture.

“v1 was a fan-out of focused specialist agents: one for security, one for tests, one for performance, one for code quality”article, stated
“But it kept missing the architectural issues: a refactor that quietly changed a contract, a new abstraction that didn't fit, a deletion that broke something three repos away. Specialist agents don't see the bigger picture, because none of them are looking at it.”article, stated

Two general-purpose reviewers inspect the whole change

Rejected because: Whole-change reviewers had too much to do and lost real findings because attention spread thin.

“v2 introduced two parallel general-purpose reviewers that each saw the whole change. They were better at catching architectural and cross-boundary issues because they had the context to reason about how the pieces fit together.”article, stated
“Attention spread thin across the change, and real findings sometimes got lost. We were leaving critical issues on the table not because the reviewers couldn't catch them, but because the system had not decided what deserved deep investigation.”article, stated

Optimize for catching everything

Rejected because: Surfacing every possible concern creates PR spam and causes engineers to ignore or mute the agent.

“The single biggest decision in building this was refusing to optimize for "catch everything." The common approach is to surface every possible concern, rank them, and leave the filtering to the human. The cost of that approach is predictable: PR spam, muted notifications, ignored comments.”article, stated
“The single biggest decision in building this was refusing to optimize for "catch everything." The common approach is to surface every possible concern, rank them, and leave the filtering to the human. The cost of that approach is predictable: PR spam, muted notifications, ignored comments.”article, stated

Dump all available context into the model

Rejected because: Full AGENTS.md, full diff, and README context produced confident-sounding but unfocused reviews.

“The standard approach to AI code review is to dump as much context as possible into the model: the entire AGENTS.md, the full diff, maybe the repo's README.”article, stated
“standard approach to AI code review is to dump as much context as possible into the model: the entire AGENTS.md, the full diff, maybe the repo's README. Then you hope it notices the right things. We found this produces confident-sounding reviews that miss the specific things that actually matter.”article, stated

Patterns

multi-agent-orchestration (review-pipeline)

DoorDash separates lead generation from verification, using a lead scout followed by two deep reviewers rather than a single monolithic reviewer.

“Splitting noticing from verifying let us go deeper on the things that matter”article, stated
“The two deep reviewers then take those leads and dig in”article, stated

retrieval-ranking (context-selection)

The agent routes PRs to only the domain review profiles relevant to the touched code, rather than loading all possible guidance.

“Then we route.”article, stated
“A PR touching the consumer feed gets a completely different set. The agent reviewing a fraud-detection change is, effectively, a different reviewer”article, stated

eval-driven-development (quality-loop)

DoorDash uses real review misses and high-severity incidents as a small eval set for prompt, retrieval, model, and profile changes before production.

“we use a smaller eval set built from real review misses and high-severity incidents.”article, stated
“The eval set is how we test changes to prompts, retrieval strategies, model choices, and review profiles before they reach production.”article, stated

model-routing (cost-quality)

Because the workflow is staged and model-agnostic, DoorDash can use cheaper models for simple stages and stronger models for verification-heavy work.

“The agent's architecture is deliberately model-agnostic.”article, stated
“we can use cheaper models for simpler steps, reserve stronger models for verification-heavy steps”article, stated

durable-execution (bounded-runs)

The review runner uses per-agent soft and hard timeouts to bound stuck agent loops and return verified findings instead of wasting long runs.

“We moved to tighter per-agent soft and hard timeouts.”article, stated
“The hard timeout is the final kill switch.”article, stated

Tradeoffs

Optimize for precision over recall

Chose Fewer, falsified, high-confidence comments over Surfacing every possible concern and letting humans filter.

Rationale: Trust and voluntary enablement mattered more than catching every possible issue, because a muted reviewer catches nothing.

“We'd rather miss some issues than become noise. A reviewer that's muted catches nothing.”article, stated
“The agent posts fewer comments than a naive approach would”article, stated

Build internally

Chose DoorDash-owned review pipeline over A generic third-party reviewer.

Rationale: Owning the pipeline allowed DoorDash to encode internal doctrine, use full-repo context, swap models, and tune cost.

“We built our own because we wanted the review agent to deeply understand DoorDash, not code in general.”article, stated
“Owning the system gives us several things worth calling out”article, stated

Stage review work by risk and difficulty

Chose Cheaper/simple steps plus stronger verification-heavy steps over One expensive model pass for every PR.

Rationale: Cost per successful review matters more than token price, and staged workflows make cost tunable without silently losing quality.

“The cheapest model is not always the cheapest review.”article, stated
“The unit that matters is not token price. It is cost per successful review.”article, stated

Use AI to close the fix loop but keep normal review

Chose Remote fixer commits as ordinary PR diffs over Removing engineer ownership after a finding.

Rationale: The fixer removes mechanical handoff while preserving CI and human review for the resulting change.

“Reviewable output. The result is still a normal PR commit or diff, subject to the same CI and human review as any other change.”article, stated
“This is not about removing engineer ownership.”article, stated

Gotchas (what bit them)

Specialized agents can miss architectural issues.

Root cause: Narrow reviewers lack cross-cutting context and do not see the bigger picture.

Resolution: Use a lead scout and deep reviewers that can inspect full change context and investigate suspicious leads.

“This was good at catching mechanical bugs like missing nil checks”article, stated
“But it kept missing the architectural issues”article, stated

More context can make reviews worse.

Root cause: Authoring docs contain setup, style, and general guidance that is noisy for review.

Resolution: Mine per-domain review profiles that keep only review-relevant invariants, rules, and historical lessons.

“They mix architectural guidance, setup instructions, coding patterns, and style notes into a single document.”article, stated
“So we built a different layer: per-domain review profiles that capture only the things a reviewer needs to know.”article, stated

A stuck agent can burn tokens without making progress.

Root cause: Max-turn limits did not detect loops when the turn counter was not advancing.

Resolution: Add per-agent soft and hard timeouts so the system returns only already verified findings or kills the run.

“the same model request could repeat over and over while the review made no progress.”article, stated
“Max-turn limits did not catch it because the loop was not advancing the turn counter.”article, stated

Correct findings can still fail as review comments.

Root cause: Broad, weak, duplicate, or stale comments erode trust even when the underlying concern is real.

Resolution: Anchor comments to changed files and lines, give concrete behavior risk, collapse stale comments, and drop unactionable concerns.

“Correct findings can still be bad comments.”article, stated
“The comments that work are anchored to a changed file and line, explain the concrete behavior at risk”article, stated

Evaluation

DoorDash uses production acceptance rate as the lagging trust signal and a smaller incident/review-miss eval set for day-to-day development of prompts, retrieval, model choices, and review profiles.

Metrics: 60.2% settled high/critical finding acceptance · 59.0% webhook-triggered finding acceptance · review cost of roughly $3 · findings posted about seven minutes after PR open · small eval set from real review misses and high-severity incidents

3 supporting quotes
“Acceptance rate is the production signal. It tells us whether engineers trust the comments enough to act on them.”article, stated
“But acceptance is a lagging indicator”article, stated
“we use a smaller eval set built from real review misses and high-severity incidents.”article, stated

Outcomes

DoorDash reports more than 10,000 weekly PR reviews across 56 repositories, 60.2% acceptance on high/critical findings, 59.0% webhook-triggered acceptance, roughly $3 per review, and about seven minutes to findings.

3 supporting quotes
“These numbers hold up across very different codebases.”article, stated
“Acceptance on a Go backend repo looks similar to acceptance on an iOS repo, which looks similar to acceptance on a web frontend.”article, stated
“The next step is scaling that development loop.”article, stated