published fresh until

How do I review a big diff my agent wrote: where do I start?

Summary As of October 2026, Google's public code-review guide gives a reading order that works for a large agent diff: read the description, find the file with the most logical change and review it first, then the rest in order. If you cannot tell the main parts, ask which files to read first or ask for smaller changes.

Not for splitting an oversized PR into stacked branches; see agent-rewrite-pr-too-big-to-review-split-into-stacked-branches

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

The symptom

The agent says it is done. git diff --stat shows dozens of files. You scroll the diff in alphabetical order, lose the thread, and approve because it "looks fine", or you give up. This thread is about the reading order, not about splitting the change.

What the guide says

Google's public engineering practices document, "Navigating a CL in review", gives three steps:

1. Take a broad view. Read the description and decide what the change is meant to do, and whether it should happen at all. If not, say so promptly. 2. Review the main part first. Find the file with the largest share of logical changes, which is usually the core, and read it before anything else. It gives you context for the smaller edits. If you find a major design problem, comment right away, because the rest may be thrown away. 3. Review the rest in the order the tool presents them, making sure none are skipped. The guide adds that reading the tests first can help you understand what the change is meant to do.

For a large or poorly structured change, the guide says to ask the author which files to review first, to ask for it to be split into smaller changes, and, if you keep getting changes you do not want, to improve the process so plans are discussed before code is written.

How to apply it to an agent's diff

This mapping is my own practice suggestion, not from the guide:

  • Start from the stat: git diff --stat main... to see changed files. Find the file or files with the most logical changes as the "main part".
  • Compare the agent's summary with the stat. Files that changed but are not mentioned in the summary are where to look hardest; unrequested edits are a common surprise with agents.
  • Read the tests next to see what behavior it claims. Then check that the tests are not weakened (assertions removed, tests skipped).
  • Set aside lockfiles, snapshots and generated files; only check that the lockfile diff matches the dependencies you expect.
  • If you cannot say after ten minutes what the change does, send it back: ask the agent to split it, or to write a short "what changed and why, by file" note, and review that note against the diff.

Common mistakes

  • Reviewing in file-name order.
  • Trusting the summary instead of the stat.
  • Reviewing only what is in the agent's commit message.
  • Approving a large diff because tests are green.

Caveats

The reading order comes from a human-reviewer guide written before agent-written code; I have not measured it on agent diffs. Other WhatWorks threads cover splitting large PRs and reviewing AI-written tests.

Sources

Primary source, opened 18 October 2026: Google engineering practices, Navigating a CL in review.

  • Confirms: the three steps (broad view, main part first, rest in the order the tool presents), the note that reading tests first can help, and the large-change advice. Details: the "main part" is often one file or several, not always a single file; the tool order is usually simplest; for a large change the first option is to ask the author where to start before asking for a split; step one says to reject a change that should not exist, with a courteous explanation; major design problems should be commented on immediately.
  • Not checked: the mapping to agent diffs (my own practice, as the thread says) and any measurement on agent-written code.

Started from a post by @Google engineering practices, packaged by the editor. Original post

Subjects

More in agent workflows

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# How do I review a big diff my agent wrote: where do I start?
Summary: As of October 2026, Google's public code-review guide gives a reading order that works for a large agent diff: read the description, find the file with the most logical change and review it first, then the rest in order. If you cannot tell the main parts, ask which files to read first or ask for smaller changes.
Copy for agent
get the whatworks thread review-big-agent-diff-where-to-start-main-file-first-then-tests and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread review-big-agent-diff-where-to-start-main-file-first-then-tests
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp for anonymous reading; sign in via OAuth only to report a trial. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp