When Agents Write 40% of Your PRs, Review Becomes Your Control Surface
GitHub’s Octoverse 2026 report , published on 28 October, says more than 40% of September’s pull requests started with an agent’s first draft. In March the share was 17%. September’s total was 110 million agent-started pull requests, about six times March’s volume. GitHub calls the figure a floor, since it only counts agents it can detect.
A second number in the same report deserves more attention. In September, 90% of agent-started pull requests merged within two weeks, against about 86% of pull requests with no detected agent involvement. In February the agent figure was 83%. Agent work has gone from merging less often than human work to merging more often in seven months.
That could mean the agents got better. It could also mean reviewers got tired. The report cannot tell you which, and your own repositories can only tell you if review is built to leave evidence.
Accountability needs a mechanism
At GitHub Universe the same day, GitHub launched an agent-first Copilot app, Copilot projects for parallel multi-repo agent sessions, and scheduled Copilot automations. The announcement says developers “set the direction, make decisions, and stay accountable for what ships.”
Accountability is a promise. A control is the thing that makes the promise checkable after the fact. When an agent writes the first draft, almost every security property of the change depends on what happens between the draft and the merge: who looked at it, whether they had the authority to approve it, and whether anyone can prove that six months later. That makes code review the main security gate in your development process.
What GitHub enforces for you
GitHub has built several controls into its own agent, documented on its risks and mitigations page :
- The person who asked Copilot cloud agent to open a pull request cannot approve it.
- When the agent opens a pull request that is not attributed to a person, rulesets require one approval more than the configured number. The rule is on by default and in public preview.
- The agent cannot approve or merge, and it pushes only to its own
copilot/branch or the branch of the pull request it was asked to work on. - By default, GitHub Actions workflows do not run on the agent’s changes until someone with write access approves them.
- Agent commits are signed, authored by Copilot with the requesting developer as co-author, and linked to session logs.
These are good defaults. They also share one boundary: they apply to GitHub’s own agent. An agent running in a developer’s terminal typically pushes with that developer’s credentials, and GitHub sees a human. Your controls have to work for both.
What you have to configure
The extra-approval rule does nothing when a ruleset requires zero approvals. Branch rules are where the real work sits, and the ruleset reference lists the options that matter:
- Require a pull request with at least one approval. Without this, every other review rule is advisory.
- Require approval of the most recent reviewable push. Someone other than the last pusher must approve. This is the agent-agnostic version of GitHub’s Copilot rule: it stops a developer approving a change their local agent just pushed under their name.
- Dismiss stale approvals on new commits. Agents iterate fast. An approval given three pushes ago describes a different diff.
- Require review from code owners. Authentication, payment and infrastructure code gets a named human owner who must sign off.
- Keep the bypass list short. Every bypass actor is a route around the gate. Review the list with the same suspicion you apply to admin accounts.
Here is a starting ruleset for the default branch, applied with gh api -X POST repos/OWNER/REPO/rulesets --input ruleset.json:
{
"name": "default-branch-review-gate",
"target": "branch",
"enforcement": "active",
"conditions": {
"ref_name": { "include": ["~DEFAULT_BRANCH"], "exclude": [] }
},
"bypass_actors": [],
"rules": [
{ "type": "deletion" },
{ "type": "non_fast_forward" },
{
"type": "pull_request",
"parameters": {
"required_approving_review_count": 1,
"dismiss_stale_reviews_on_push": true,
"require_code_owner_review": true,
"require_last_push_approval": true,
"required_review_thread_resolution": true
}
}
]
}
Add your required status checks once you know their names. Code owner review only bites once a CODEOWNERS file exists, so write that file first.
Check your plan before you start. When I queried this site’s own repository, GitHub refused: branch rules on a private repository need a paid plan. Its last twelve pull requests merged with zero reviews. For a one-person blog that is an accepted risk. For a team where agents draft four changes in ten, the same setup means nothing stands between a draft and production.
One setting deserves a deliberate decision. Copilot code review can now submit an approving review that counts toward required approvals, but only when enabled at repository, organisation and enterprise level. By default its reviews do not count, and GitHub’s code review documentation tells you to “supplement Copilot’s feedback with a human review.” My recommendation is to keep the default. An agent reviewing an agent’s work leaves no human in the chain, and A.5.3 segregation of duties assumes one.
Make the agent visible in the audit log
The enterprise audit log now marks agent activity. Filter with actor:Copilot and each event carries actor_is_agent, an agent_session_id and a user field naming the person who started the work, per GitHub’s agentic audit log reference
. That gives you the pair an auditor wants: what the agent did and which human it acted for.
Two limits apply. The log keeps 180 days , and GitHub recommends streaming it to a SIEM for anything longer. It also excludes prompts sent to Copilot locally, so the instructions behind a change live on the developer’s machine unless you collect them. Agents outside GitHub’s own product show up as their human operator, which is one more reason to give them their own identities, a topic covered in the post on onboarding AI agents like employees .
Mapping to your ISMS
ISO/IEC 27001:2022 already has the controls. Agent-authored code changes the evidence you need for them.
| Control | What it requires | Application to agent-authored pull requests |
|---|---|---|
| A.5.3 Segregation of duties | Separate conflicting duties | Author and approver are different people; agent approvals do not count |
| A.8.4 Access to source code | Manage read and write access | Agents push to working branches only; bypass lists reviewed |
| A.8.15 Logging | Produce, store and analyse logs | Stream agent events to the SIEM beyond 180 days |
| A.8.25 Secure development life cycle | Define rules for secure development | A written agent policy covering when agents may open pull requests |
| A.8.28 Secure coding | Apply secure coding principles | Code owners review sensitive paths whoever drafted them |
| A.8.29 Security testing | Test security during development | Required status checks, including code scanning, gate every merge |
| A.8.32 Change management | Control changes to systems | The ruleset is the change control, and its history is the evidence |
The earlier posts covered the agent’s own permissions and its plugin supply chain . This one covers the output. Together they describe the full path from prompt to production.
Watch the reviewers, too
Review capacity is now the constraint. When six times as many drafts arrive, a team that keeps the same headcount reviews less per change. Track three numbers each month: median time from “ready for review” to approval for agent-started and human-started pull requests, the share of approvals with no review comments, and the size of approved diffs. A fast approval with no comments on a 900-line agent diff is a rubber stamp, whatever the merge rate says.
Small pull requests help more than any tool. Ask agents for changes a reviewer can read in one sitting, and reject the rest.
Usage-based AI credits bring their own budget risk. The Copilot billing post covers caps and reporting, so I will leave it there.
FAQ
Can an AI agent approve its own pull request on GitHub?
No. Copilot cloud agent cannot approve or merge, and the developer who requested the work cannot approve it either. Copilot code review can approve only if an administrator enables that at every level.
Which ISO 27001 controls cover AI-generated code?
The secure development controls A.8.25 to A.8.29, change management at A.8.32, segregation of duties at A.5.3 and logging at A.8.15. None needs rewriting. Each needs evidence that a human reviewed agent output.
How do I find agent activity in the GitHub audit log?
Apply the actor:Copilot filter to the enterprise audit log. Events carry actor_is_agent, agent_session_id and the initiating user. Stream them to a SIEM to keep more than 180 days.
A starter agent policy
==================================================
AI CODING AGENT REVIEW POLICY (v1.0)
==================================================
[ ] 1. Every default branch has a ruleset requiring
one approval from someone other than the last pusher.
[ ] 2. Approvals dismiss on new commits; code owners
review sensitive paths.
[ ] 3. AI reviews comment; only humans approve.
[ ] 4. Agent events stream to the SIEM; bypass lists
are reviewed quarterly.
[ ] 5. Agent pull requests stay small enough to review
in one sitting; reviewer load is reported monthly.
==================================================
This week, open the settings of your three busiest repositories and count how many approvals the default branch requires. If the answer is zero, every agent draft in those repositories can merge without a second pair of eyes.
Sources: GitHub Octoverse 2026 , 28 October 2026; GitHub Universe 2026 announcement , 28 October 2026; GitHub Docs on Copilot cloud agent risks and mitigations , ruleset rules , Copilot code review , agentic audit log events and Copilot audit logs , retrieved 5 November 2026. The ruleset, metrics and policy are the author’s recommendation.