GitHub has implemented a strict separation of duties for its Copilot cloud agent, explicitly preventing the developer who prompted the AI from approving the resulting pull request. According to GitHub’s documentation, if a repository requires approvals, the prompt writer’s click is ignored, forcing a second human reviewer to sign off before the code can merge. This policy treats the human who assigns the issue to Copilot as a co-author rather than an independent reviewer, aligning with existing rules that prevent pull request authors from approving their own work.

The Cloud Agent’s Guardrails

The platform’s risk mitigation strategy for Copilot is comprehensive. The agent operates within a fresh copilot/ branch with limited push permissions, and it cannot mark its own pull requests as 'Ready for review.' Crucially, GitHub Actions workflows do not run automatically when the agent pushes changes; a user with write access must manually click 'Approve and run workflows.' This gate ensures that unreviewed AI-generated code does not gain write access to the repository or expose Actions secrets prematurely, although administrators can opt out of this specific workflow check as of a March 13, 2026, changelog update.

The Local Agent Blind Spot

While GitHub enforces these controls in the cloud, the same discipline vanishes on local machines. When developers run coding agents like Claude Code or Codex in their terminals, the commits are authored under their own Git identity. If the developer merges these changes locally, no external rule applies. The prompt writer is effectively the author, the reviewer, and the shipper. GitHub’s protected branch rules do not detect that an AI agent generated the code, allowing a single person to bypass the two-person rule that governs cloud-based agent workflows.

Closing the Loop with Branch Protections

To replicate GitHub’s cloud security locally, developers must enforce strict branch protections. The recommended approach is to avoid local merges entirely. Instead, use the GitHub CLI to push agent branches and open pull requests (gh pr create --base main --fill). This forces the code through the standard review pipeline. Developers should enable 'Do not allow bypassing the above settings' to remove admin exemptions and require status checks to pass. By making the agent’s branch land as a PR that requires a teammate’s approval, the separation of duties is preserved, ensuring that no single individual—human or AI—can unilaterally ship code.

Key Takeaways

  • GitHub prevents the user who prompted Copilot from approving its pull requests, treating them as co-authors.
  • Local agents running in terminals bypass these checks, allowing developers to merge their own AI-generated code.
  • Developers should use gh pr create for local agent branches to enforce team-based review requirements.
  • Admin bypasses on protected branches must be disabled to ensure even repository owners follow the two-person rule.

The Bottom Line

GitHub got the policy right for the cloud, but the industry needs to enforce separation of duties on local machines too. Don’t let your terminal become a backdoor for unreviewed AI code.