GuidesUpdated

How to review an AI-generated pull request

Review agent-written code step by step: inspect the diff and running app, vet a second agent's findings, address comments, fix CI, and decide to merge.

On this page

Review an agent's PR as a proposed product change, not a record of effort. Start from the requested behavior, inspect the diff and running result, test risky paths, and re-review the latest commit after feedback. A green check only covers what the repository checks.

Canopy pull request review beside agent findings and a code diff
Canopy pull request review beside agent findings and a code diff

Fix the review target before reading a summary

Write down the behavior the issue asks for. Note the PR's base branch, head branch, latest commit, and changed files. GitHub's conversation, commits, checks, and diff each answer a different question. An agent's summary can skip an unintended file, so compare the diff with the stated scope. Canopy's Agent Workspace shows the session, checkout, files, commits, diff, branch, and PR together.

Trace one behavior through the change

Say a PR prevents double submission of a settings form. Check the button state, request handler, server response, retry path, and tests. In the running app, try one good save and one failed request, noting URL, checkout, and result. A disabled button in a screenshot doesn't prove only one request reached the API. Then confirm the code matches what you saw.

An evidence trail for the settings-form PR.
QuestionEvidence to inspectWhat could still be missing
Does Save send one request?Browser network entry and handler changeKeyboard or repeated-click path
Does failure recover?Rejected response, visible message, retryLoading state that never clears
Was the scope kept?Full Files changed list and commit historyUnrelated configuration or generated files
Do checks support the claim?Named checks and logs for the latest commitBehavior the suite never exercises

Treat a second agent's findings as leads

Give a reviewer agent the PR, intended behavior, and a read-only request for concrete defects: file and line, failure path, evidence. Reproduce each concern, or explain why it doesn't apply, before posting. 'Looks good' hasn't checked the error path, and unverifiable risks shouldn't become public comments. GitHub lets you collect pending comments, then submit Comment, Approve, or Request changes.

Handle comments and CI in separate rounds

Decide whether each valid comment needs code, a test, docs, or an explanation. Send the exact thread and expected behavior to the implementing agent, then inspect its diff and reply. If a check fails, read the first relevant error before asking for a fix; the cause may be setup, a test, or product behavior. When a fix touches behavior, retest the running app and review the latest head commit, not an earlier approval.

Make the merge decision explicit

Before merging, confirm the request is met, critical concerns are closed, the latest checks are understood, and someone saw the final diff. Protected branches can require reviews and checks; settings differ by repository. Record remaining risks and who accepts them. If a commit arrives after approval, repeat the affected checks. The related checklist is a quick pass; this guide is the full sequence.

Copyable resources

Read-only reviewer request

Give the reviewer agent the exact PR and task before using this prompt.

Review this pull request against its issue and acceptance criteria. Do not edit files, post comments, approve, or merge.
For each possible defect, report: file and line, the failing behavior, the path that reaches it, and evidence or a reproduction. Separate confirmed findings from hypotheses.
Check success, error, retry, and out-of-scope changes. Name the head commit you reviewed and the checks you inspected. If evidence is missing, say what a human should test next.

Frequently asked questions

Can an AI reviewer approve an AI-generated PR for me?

An agent can propose findings, but a person should verify them against the diff and behavior and own the approval.

If CI is green, can I skip a live app check?

Only if the change has no behavior that needs one and the tests cover its risk. For a user-facing flow, check the running result and at least one failure path.

What if the agent pushes after I reviewed?

Find the new head commit, inspect its diff, review the relevant checks, and retest affected behavior before merging.

More questions and answers →

Sources and further reading