PlayerTwo
FIELD NOTES / COLLABORATIVE AI CODING

How to review AI-generated code as a team

Turn large coding-agent diffs into reviewable checkpoints with clear ownership, small pull requests, test evidence, and focused live collaboration.

For engineering teams reviewing work produced with coding agents

A coding agent can generate a feature faster than a team can understand it. That becomes a review problem when schema changes, services, UI work, and tests arrive as one finished diff.

A recent r/softwarearchitecture discussion described exactly that situation: roughly 9,000 lines across 50 files, produced in a day, with reviewers trying to reconstruct the architecture afterward. The useful response is not a longer checklist for the final pull request. It is a workflow that creates reviewable checkpoints before the diff becomes a black box.

This guide gives you that workflow. It applies whether the code came from Claude Code, Codex, Copilot, or another agent.

Separate generation from acceptance

Code generation and code acceptance are different jobs. The agent can propose an implementation, explain a diff, or run checks. The author still has to understand what changed, and the team still has to decide whether the change belongs in the system.

GitHub's guide to reviewing AI-generated code starts with automated tests and static analysis, then asks reviewers to verify intent, architecture, dependencies, maintainability, and AI-specific failure modes. That order matters: a green test run is evidence about tested behavior, not proof that the implementation solves the right problem.

Set the ownership rule before anyone prompts an agent:

The developer who submits the change owns its design, behavior, test evidence, and explanation. An agent's summary is supporting material, not authorship or approval.

Plan review boundaries before the agent starts

Do not ask for “the whole feature” if the whole feature crosses boundaries that different people need to review. Write an implementation map first. Name the decisions that require human agreement and the smallest change that can establish each one.

For a feature that touches storage, an API, and a user interface, the map might be:

  1. Approve the data model and migration behavior.
  2. Approve the service interface and error semantics.
  3. Implement one end-to-end path with tests.
  4. Add remaining cases as separate, focused changes.
  5. Keep unrelated cleanup and refactoring out of the feature diff.

This is not a rule that every layer needs its own pull request. The goal is one understandable decision per checkpoint. Google's guidance on small changes defines the useful unit as one self-contained change, not an arbitrary line count. It also recommends planning how to split dependent changes before coding and keeping related tests with the production change.

Use a checkpoint contract

Give the agent and the reviewers the same short contract for each checkpoint. It should make scope visible before implementation and make omissions visible before approval.

Field What to record What the reviewer decides
Intent One behavior or architectural decision Is this the right problem and boundary?
Allowed scope Files, modules, APIs, and dependencies that may change Did the implementation stay inside the agreed area?
Invariants Compatibility, security, data, and operational constraints Are the constraints preserved in code and tests?
Evidence Checks run, important results, and manual verification Is the evidence relevant and reproducible?
Open questions Unknowns the agent could not resolve from repository context Who has the domain knowledge to decide?

Open a draft pull request as soon as the first meaningful boundary exists. GitHub documents draft pull requests as a way to share work in progress without formally requesting review, while its authoring guidance recommends small, focused pull requests with clear context. A draft gives teammates a place to challenge the direction before the agent builds on it.

Divide review work by judgment, not by whoever is free

A single approval can hide several unanswered questions. Assign review responsibility by the decision being made:

  • Author: reads the complete diff, removes accidental changes, and explains the design without relying on the agent transcript.
  • Domain reviewer: checks business rules, edge cases, and whether the behavior matches the product requirement.
  • Boundary owner: reviews schema, API, security, infrastructure, or other cross-team contracts.
  • Automation: runs deterministic checks such as tests, types, linting, dependency review, and static analysis.
  • Optional agent reviewer: looks for additional defects or missing cases, with findings verified against the code before they are accepted.

GitHub's pull-request review model supports requesting specific people or teams and automatically involving code owners. Its review documentation also keeps comments, approvals, and change requests distinct. Use that distinction: a specialist commenting on one boundary is not necessarily approving the entire change.

Review the design before polishing implementation details. Google's reviewer guide puts overall design first, then functionality, complexity, tests, naming, documentation, and context. That order prevents a team from spending an hour on style in code built around the wrong abstraction.

Make evidence part of the change

Ask for evidence that a reviewer can inspect, not a sentence saying “tests pass.” The pull request should identify:

  • the exact checks that ran and any important checks that did not run;
  • the behavior each new or changed test covers;
  • manual verification for user-visible or operational behavior;
  • new dependencies, permissions, migrations, or configuration;
  • known limitations and follow-up work that is deliberately out of scope.

Review the tests as code. A generated test can reproduce the implementation's assumption instead of the requirement, skip a failing path, or assert an incidental detail. GitHub's AI-code guidance explicitly calls out deleted or skipped tests, hallucinated APIs, suspicious dependencies, and code that looks plausible while missing the intended behavior.

Agent-assisted review can help find another class of issue, but it should not collapse review authority back into the same system that wrote the change. For example, the Codex app's /review command lets you ask Codex to review against a base branch or review uncommitted changes. It reports prioritized findings without changing the working tree. Treat those findings as leads to verify, not as a merge decision.

Review live when the diff is not enough

Most checkpoints should remain asynchronous. Pull requests preserve the decision, discussion, and evidence. A live session is useful when the reviewer cannot reconstruct why the agent chose a path, when two possible boundaries are still in play, or when a failure is easier to reproduce than to describe.

Use the live session to answer one concrete question:

  1. State the disputed behavior or boundary.
  2. Reproduce the relevant agent output or failing path.
  3. Let the reviewer inspect context and, if appropriate, steer the next step.
  4. Write the decision and evidence back into the pull request.

Do not let the call become the only record of the decision. The durable review still belongs in the repository workflow.

If both people need to inspect the active agent terminal, PlayerTwo lets an admitted teammate watch the host's local agent session in a browser and request the keyboard. The host can grant control and take it back by typing. The product demo shows that handoff. This is useful for a focused intervention; it does not replace tests, a reviewable diff, or pull-request approval.

Triage an existing giant pull request

If the large diff already exists, do not begin with line-by-line review. First decide whether it can be reviewed responsibly in its current shape.

  1. Freeze scope. Stop feature additions and unrelated cleanup.
  2. Map the change. List behavior, boundaries, dependencies, migrations, and generated files.
  3. Find the first high-impact decision. Review the schema, public interface, or security model before downstream implementation.
  4. Separate mechanical changes. Move formatting, generated output, and pure refactors away from behavior changes where practical.
  5. Choose split or restart. If reviewers cannot explain the change from its description, code, and evidence, return it for decomposition instead of manufacturing approval.

Splitting after generation takes work. That cost does not make an incomprehensible change ready to merge. If the branch cannot be divided without breaking the system, use stacked changes or a sequence of draft pull requests, with dependencies stated explicitly.

Adopt a small team policy

A policy does not need to ban agent-written code or prescribe one tool. It needs to make responsibility and reviewability explicit. Start with these rules:

  • The submitting developer owns every line, regardless of how it was produced.
  • Each pull request has one primary purpose and includes the tests for that purpose.
  • Architecture and cross-team boundaries are reviewed before dependent implementation grows.
  • Agent summaries are checked and edited by the author.
  • Automated and agent review supplement named human judgment; they do not silently replace it.
  • When the change is too large to understand, “split this first” is a valid review outcome.

Then inspect your next few agent-assisted changes. Record where reviewers lost context, which checks found real issues, and which checkpoints arrived too late. Adjust the policy from observed failures rather than adding a longer generic checklist.

The reviewable unit is the control point

AI-generated code does not need a separate quality bar. It needs a workflow that keeps production speed from outrunning shared understanding. Define boundaries first, review one decision at a time, attach evidence, and bring a teammate into the live session only when the recorded diff cannot answer the question.

The practical measure is simple: before approval, can the author and the right reviewer explain what changed, why this design belongs in the system, and what evidence supports it? If not, the next step is decomposition—not a faster approval.

KEEP BUILDING, TOGETHER

A second pair of eyes.
The same running agent.

See a PlayerTwo session