A pull request written by an AI agent should be approved by a human who did not launch the agent, with code owners reviewing sensitive paths. Require approval again after any new push. The person who prompted the agent is the author in practice, so they should not be the only reviewer.
The reviewer independence problem
When a developer prompts an agent and then approves the result, nobody independent has looked at it. That is not review, it is acceptance. The fix is the same as for human authored code: separate the author from the approver.
GitHub's documentation describes a branch protection option that requires the most recent reviewable push to be approved by someone other than the person who pushed it. That maps neatly onto agents, where the pusher might be the developer or a bot identity.
Settings that support independent review
| Setting | What it does | Why it helps with agents |
|---|---|---|
| Require pull request reviews | Needs a set number of approvals | Blocks self merge |
| Require review from Code Owners | Owners must approve files they own | Sensitive paths get an expert |
| Dismiss stale approvals | New pushes reset approval | Agent cannot add changes after approval |
| Approve most recent reviewable push | Last push needs someone else | Stops pusher approving their own change |
| Required status checks | Tests and scans must pass | Machine checks run every time |
| Do not allow bypassing | Removes admin exemption | Admins are exempt by default otherwise |
On CODEOWNERS, the docs state that approval from any one listed owner satisfies the requirement and that the last matching pattern wins. Owners need write access.
A review routine for agent changes
- Read the description last. An agent's summary can sound sure of itself. Read the diff first, then compare it with the summary.
- Look for files the task should not touch. Workflow files, lockfiles, config, and permission settings deserve a second look.
- Check new dependencies by name. Confirm each exists, is the one you meant, and is maintained.
- Run it. Pull the branch and run the tests, not just the CI badge.
- Ask what is missing. Agents often skip error handling and edge cases that a human would add.
For a fuller list, see the AI written pull request review checklist.
Who counts as independent
A second developer on the team, yes. A different bot, no, unless you treat its findings as one input among others. Automated reviewers are useful as an extra reader. They do not replace a person with accountability for the merge.
Try it yourself
Click through it at your own pace, or open it full screen.
Watch which checks run before the merge button unlocks, then picture the human approval sitting on top of them.
Safeguard offers pull request gates and policies you can use alongside required review.
Quick check
Can the agent approve its own pull request?
It should not. Require a human approver who is not the pusher.
Do small changes need the same review?
Apply the same rule everywhere, and use code owners to add depth on sensitive paths. Exceptions for small changes tend to grow.
Sources
Last reviewed: 19 October 2026.