GitHub changed Copilot code review on July 17, 2026: reviews now read supported instruction files from the pull request’s head branch, can use a dedicated runtime setup file, and run behind a configurable firewall by default on GitHub-hosted runners. Organizations can also choose runner types for Copilot code review independently from the Copilot cloud agent. The update affects repository administrators and engineering teams using Copilot on pull requests. The practical consequence is that teams can test review rules before merging and prepare review-specific tools, but they must audit head-branch instructions, network allowlists, and runner trust boundaries before enabling automated reviews broadly. GitHub’s tutorial now documents the head-branch behavior, so the current tutorial and July 17 changelog agree on the rollout model.

Key takeaways

  • Copilot code review now reads copilot-instructions.md, *.instructions.md, agent skills, and AGENTS.md from the pull request’s head branch, according to GitHub’s July 17 changelog.
  • REVIEW.md, GEMINI.md, and CLAUDE.md are now recognized as additional repository instruction sources.
  • A dedicated .github/workflows/copilot-code-review.yml can install dependencies, select a repository-level runner, and perform preparation steps for reviews. An existing copilot-setup-steps.yml is the fallback when the dedicated file is absent.
  • GitHub says the review environment has a firewall enabled by default, but its firewall does not currently cover self-hosted runners.
  • These controls can improve relevance and isolation; they do not make AI feedback deterministic or replace required human approval.

What changed in GitHub Copilot code review

The update combines four related controls rather than introducing a new review product. Each control changes a different part of the review path.

ControlJuly 17 behaviorDecision for teams
Instruction sourceSupported instructions are read from the pull request head branchDecide who may change review instructions and how those changes are reviewed
Recognized filesREVIEW.md, GEMINI.md, and CLAUDE.md join existing supported instruction formatsCheck for overlapping or conflicting rules already in the repository
Runtime setupA dedicated copilot-code-review.yml can prepare the review environmentInstall only the tools needed to inspect the repository
Network accessFirewall enabled by default on supported hosted environmentsAllowlist only necessary destinations; handle self-hosted runners separately
Runner selectionCode review and cloud agent runner settings are independentAssign each agent an environment suited to its permissions and dependencies

This is narrower than a general AI code review workflow. The update is mainly about controlling the context and environment Copilot receives when it analyzes a pull request.

Head-branch instructions change the trust model

The head branch is the source branch containing the proposed changes. The base branch is the destination, commonly main. GitHub says Copilot code review now reads supported custom instructions from the head branch, allowing a developer to add or revise instructions in a feature branch and evaluate their effect before merging.

That makes instruction iteration easier. A pull request can introduce a path-specific rule alongside the code it governs, and reviewers can see whether Copilot applies that rule during the same review cycle. Teams no longer need to merge a rule into the base branch before observing its behavior.

It also means instruction changes are part of the reviewed input. A contributor who can modify a head branch may be able to change what Copilot is asked to prioritize or ignore. This does not automatically grant the contributor additional repository permissions, but it can influence automated feedback. Treat instruction files as operational policy:

  1. Require code-owner review for repository-wide instruction files.
  2. Make instruction changes conspicuous in pull request templates or labels.
  3. Avoid rules that tell the reviewer to ignore security-sensitive paths or suppress categories of findings.
  4. Compare behavior on representative pull requests before enabling automatic review across an organization.

GitHub’s current custom-instructions tutorial and July 17 changelog now agree that Copilot code review reads repository custom instructions, agent instructions, and agent skills from the head branch. Teams should still verify behavior in representative pull requests before building compliance controls around it.

Choose the right instruction file

GitHub’s documentation describes three established instruction patterns: repository-wide copilot-instructions.md, path-specific *.instructions.md files, and AGENTS.md. The July update adds recognition for REVIEW.md, GEMINI.md, and CLAUDE.md.

Use one authoritative home for each rule whenever possible:

  • Put universal security, testing, and error-handling expectations in .github/copilot-instructions.md.
  • Put language- or directory-specific rules in .github/instructions/*.instructions.md with an applyTo pattern.
  • Keep AGENTS.md for broader agent guidance that genuinely should also shape review behavior.
  • Retain REVIEW.md, GEMINI.md, or CLAUDE.md when they already serve a documented team workflow; do not duplicate the same rule across every recognized filename.

GitHub warns that custom-instruction behavior is non-deterministic, long instruction sets can lose influence, and specific directives work better than vague quality requests. Its tutorial recommends beginning with 10–20 focused instructions and iterating on real pull requests. It also says instructions cannot change the review interface, force a merge block, or make Copilot follow an external standards link. Copy the necessary standard into a controlled repository file instead of expecting the reviewer to retrieve it.

Use GitHub’s managed reviewer when repository-native configuration and pull-request integration matter more than portability. A custom continuous-integration reviewer is a different architecture: it gives the team more control over models, prompts, and evidence, but also makes the team responsible for credentials, networking, execution isolation, and failure handling.

Configure the review runtime deliberately

GitHub now supports .github/workflows/copilot-code-review.yml as the dedicated configuration for the code review environment. According to the announcement, the file can install dependencies, configure a repository-level runner independently from the cloud agent, set up tools, and run preparation steps. If it is absent, Copilot code review falls back to copilot-setup-steps.yml when that file exists.

The filename belongs under .github/workflows/, but the announcement should not be read as permission to copy an ordinary continuous integration (CI) workflow into it unchanged. Review setup should be minimal and reproducible. Install only what Copilot needs to inspect generated code, resolve project structure, or run a relevant static check. Pin important tool or action versions according to the team’s dependency policy, and avoid exposing deployment credentials to a review job.

A practical selection rule is:

  • Use no custom setup when source inspection provides enough context.
  • Add lightweight setup when generated types, dependency metadata, or local analysis tools materially improve review quality.
  • Use a specialized runner only when the repository genuinely requires its architecture, network position, or preinstalled toolchain.
  • Do not provide production access merely because an application normally uses it at runtime.

The update does not establish that more tools always produce better reviews. Extra dependencies increase startup work and enlarge the environment that must be secured. Measure whether each addition changes useful findings before standardizing it.

Understand the firewall and runner boundary

GitHub states that Copilot code review now runs behind a firewall by default and that repository administrators can configure its internet access under Settings → Copilot → Internet access. The code review firewall is separate from the Copilot cloud agent setting, which lets administrators give the two agents different network policies.

The important exception is self-hosted runners. GitHub says they do not currently support this firewall; reviews on those runners continue without it. A self-hosted runner therefore needs network restrictions at the infrastructure layer, such as outbound proxy rules, segmented networking, or platform firewall policies. Do not assume the Copilot settings page supplies a boundary it explicitly excludes.

Organization administrators can now choose runner types independently for Copilot code review and the Copilot cloud agent under Copilot → Runner type. That separation is useful when review needs read-oriented analysis while the cloud agent needs a different toolchain. It also reduces the pressure to give both products the broader agent’s environment.

Before using a self-hosted runner, evaluate repository trust, fork pull request handling, available secrets, persistence between jobs, outbound access, and cleanup. The same precautions matter in any AI-assisted DevOps workflow, because an AI agent does not remove the underlying runner’s permissions.

What this means

For a small trusted team, the immediate opportunity is controlled experimentation: add a concise review policy in a feature branch, request Copilot’s review, and confirm whether the feedback reflects the rule. Keep the default firewall and avoid custom setup until a concrete missing dependency appears.

For a larger organization, the update is an administration project. Inventory recognized instruction files, define ownership, split runner policies, and review outbound destinations before turning on automatic reviews. GitHub’s enterprise documentation recommends piloting automatic review on a limited set of repositories because reviewing every push or draft can add noise.

For regulated or high-risk code, regard Copilot as an additional reviewer, not an approval authority. GitHub says Copilot can help detect bugs or vulnerabilities and apply coding standards, but its own instruction guide notes that responses vary and may not follow every rule. Existing required reviewers, branch protection, static analysis, secret scanning, and security testing should remain enforceable controls.

Adoption decision criteria

Adopt the new configuration now when the team already uses Copilot code review, has clear repository standards, and can assign an owner for instructions and runner policy. Pilot it when repositories differ substantially or self-hosted infrastructure is involved. Wait when no one can review changes to agent instructions, the required network boundary is undefined, or automated comments would create more triage work than value.

The update is not a reason by itself to purchase or expand Copilot. Teams still choosing an AI coding environment should compare workflow fit in GitHub Copilot vs Cursor before optimizing a review configuration they may not use.

Verification checklist

  • Confirm Copilot code review is enabled for the intended users and repositories.
  • Search the repository for every recognized instruction filename and remove accidental conflicts.
  • Protect repository-wide instruction files with code owners or an equivalent review rule.
  • Test a harmless, visible instruction change on a feature branch to confirm head-branch behavior.
  • Check whether .github/workflows/copilot-code-review.yml or the fallback copilot-setup-steps.yml is active.
  • Inspect setup steps for unpinned dependencies, unnecessary credentials, and production access.
  • Verify the review firewall setting and document required outbound destinations.
  • If using self-hosted runners, enforce network controls outside Copilot and validate job isolation.
  • Confirm code review and cloud agent runner choices separately at repository and organization scope.
  • Retain human review and deterministic security checks for merge decisions.

Frequently asked questions

Does Copilot code review now use instructions from the head branch?

Yes. GitHub’s current tutorial and July 17, 2026 changelog both say Copilot code review reads repository custom instructions, agent instructions, and agent skills from the head branch.

What is copilot-code-review.yml for?

It defines preparation for the Copilot code review runtime, including dependency installation, tooling, setup steps, and repository-level runner configuration. GitHub says an existing copilot-setup-steps.yml is used as a fallback when the dedicated file is absent.

Is the Copilot code review firewall enabled automatically?

GitHub says the firewall is enabled by default for all repositories and can be configured separately from the cloud agent’s internet access. The stated exception is self-hosted runners, where this firewall is not currently supported.

Can custom instructions make Copilot block a pull request?

No. GitHub’s instruction tutorial lists attempts to block merging as unsupported. Use branch protection, rulesets, required checks, and human approvals for enforceable merge policy.

Should every recognized instruction file contain the same rules?

No. Duplicate or conflicting instructions add ambiguity. Prefer a small repository-wide policy plus focused path-specific files, and keep other recognized formats only when they have a clear existing purpose.

Official sources