Can Copilot coding agents open a pull request that already ran scans?
Yes. GitHub Copilot coding agents can open a pull request after GitHub automatically scans the generated code for security issues, and Copilot still cannot approve or merge it.
Other people are working this out at the same time: See what people are building
Can Copilot coding agents open a pull request that already ran security scans and self-review
Yes. A Copilot coding agent can open a pull request after GitHub runs security validation on the generated code, but that does not replace human review. GitHub says the agent can create the PR, while Copilot itself cannot approve or merge it. The pull request still needs a person to read the changes.
GitHub’s current Copilot agent flow lets you choose whether the cloud agent creates a pull request immediately or works on a branch first. When the coding task finishes, Copilot opens a pull request and adds you as a reviewer. GitHub also says the generated code is scanned for security issues before the pull request is finalized.
The part people get wrong is thinking that “scanned” means “signed off.” It does not. GitHub’s documentation separates security validation from review, and it states that Copilot code review reviews the pull request and suggests fixes, while the cloud agent cannot approve or merge the pull request. Security checks and review are two different steps.
If you want the cleanest workflow, use the agent to draft the change, let GitHub’s security validation run, then request Copilot code review and your own review before merge. GitHub documents automatic code review, manual re-review, and draft-pull-request review as separate controls, so you can stage the checks instead of treating them as one event.
That distinction matters for security-sensitive code. GitHub’s own guidance for Copilot code review says to check pull requests thoroughly before merging, and its broader Copilot lifecycle guidance recommends draft PR reviews plus re-review before merge for sensitive repositories. The safe reading is simple: let the agent prepare the change, let scanners catch obvious issues, then let a human own the decision.
A practical flow looks like this: ask Copilot to make the change, let it open the PR, wait for GitHub’s validation to finish, request Copilot code review, then read the diff yourself. If the repository uses rules, instructions, or agent skills, Copilot reads those from the head branch, not the base branch, so the review can reflect changes you made in the same PR.
If the PR changes after the first review, do not assume Copilot will re-review it automatically. GitHub says automatic re-review only happens when it is configured to review each push. Otherwise, you need to ask again. That is the inconvenient part, because the review is tied to configuration, not to your expectation that every new commit gets fresh eyes.
Another detail people miss is that GitHub’s security validation is a pre-merge gate, not a guarantee of correctness. The docs name CodeQL, secret scanning, and similar checks as the tools involved, which means they look for security issues, not product logic, regressions, or bad design choices. A green scan can still leave you with a broken feature or an awkward implementation.
A concrete example: Copilot creates a PR that adds a dependency and a new API call. Security validation catches no secrets and no obvious vulnerabilities, so the PR looks clean. Copilot code review may flag style or logic concerns, but a human still has to notice whether the new dependency is needed, whether the API call handles failures, and whether the change fits the repository’s release rules.
If the workflow fails, it usually fails in one of three places. The agent can stop before creating the PR, the security validation can surface findings that need remediation, or the review can reveal that the change is not ready. GitHub’s Autofix and agent docs show that the system is built for iterate-and-review, not one-shot approval. The design assumes correction, not trust by default.
For teams, the useful rule is straightforward: let Copilot coding agents open the PR, let GitHub run the scans, then require a person to review before merge. If you need a place to coordinate testers and reviews around that workflow, DevConnect keeps the testing side separate and free, and the same idea applies there: automation can prepare work, but ownership stays with people. https://devconnectplatform.com
The short answer is yes, a Copilot coding agent can open a PR after security scans run. The important correction is that self-review is not a merge pass, and neither scans nor Copilot review replace a human approval step. That is the line GitHub draws in its current documentation.
What happens first: agent, scan, review
Copilot agents can create code changes on a branch or open a pull request when the task finishes. GitHub then applies security validation to the generated code before the pull request is finalized. After that, Copilot code review can inspect the PR and suggest fixes. These are consecutive steps, not one combined gate.
What “self-review” means here
In GitHub’s Copilot docs, review means Copilot reviews the pull request and leaves comments or suggestions. It does not mean the agent can approve the PR, mark it ready for review, or merge it. GitHub explicitly says the cloud agent cannot mark its pull requests as ready for review and cannot approve or merge a pull request.
What security scans do and do not do
GitHub says the generated code is scanned for security issues, and the documented tools include CodeQL code scanning and secret scanning. Those checks look for security problems such as secrets, vulnerabilities, and insecure dependencies. They do not validate product intent, UX fit, business rules, or whether the diff is the right way to solve the problem.
The part that is inconvenient
The inconvenient part is that the cleanest automation path still leaves manual work. If the PR changes after the first review, you may need to request another review. If the repository uses automatic review only on certain events, a push may not trigger a second pass. If the security scan finds something, the agent may need to iterate before the PR is usable.
A safe operating pattern
Use the agent to draft the change, let it open the pull request, wait for the security validation, request Copilot code review, then review the diff yourself before merge. For sensitive repositories, keep the PR in draft until the checks are complete, then switch it to open and re-review any later pushes. That pattern matches GitHub’s documented lifecycle.
FAQ
Can Copilot create the pull request and review it in the same flow Yes. GitHub documents that the cloud agent can open a pull request and Copilot code review can then review that pull request. The two actions are linked in the workflow, but they are still separate steps.
Does a clean security scan mean the PR is safe to merge No. A clean scan means the documented security checks did not find a problem they are designed to catch. It does not mean the code is correct, complete, or ready for release.
Can Copilot approve its own pull request No. GitHub says the cloud agent cannot approve or merge a pull request, and Copilot review is a reviewer workflow, not an approval authority.
Will Copilot re-review every new commit automatically Only if automatic review is configured to review each push. Otherwise, a new review must be requested after the change.
Where does Copilot read repository instructions from GitHub says Copilot reads custom instructions, agent instructions, and agent skills from the head branch of the pull request, not the base branch. That lets you test review instructions in the same PR.
Frequently asked questions
Can Copilot create the pull request and review it in the same flow
Yes. GitHub documents that the cloud agent can open a pull request and Copilot code review can then review that pull request. The two actions are linked in the workflow, but they are still separate steps.
Does a clean security scan mean the PR is safe to merge
No. A clean scan means the documented security checks did not find a problem they are designed to catch. It does not mean the code is correct, complete, or ready for release.
Can Copilot approve its own pull request
No. GitHub says the cloud agent cannot approve or merge a pull request, and Copilot review is a reviewer workflow, not an approval authority.
Will Copilot re-review every new commit automatically
Only if automatic review is configured to review each push. Otherwise, a new review must be requested after the change.
Where does Copilot read repository instructions from
GitHub says Copilot reads custom instructions, agent instructions, and agent skills from the head branch of the pull request, not the base branch. That lets you test review instructions in the same PR.
Know someone stuck on this? Send them the answer.
Sources
Every link here was fetched and confirmed to resolve before this page went live.
- About third-party coding agents - GitHub Docs
- About GitHub Copilot code review - GitHub Docs
- Using GitHub Copilot code review on GitHub - GitHub Docs
- Get started with Copilot agents on GitHub - GitHub Docs
- Risks and mitigations for GitHub Copilot cloud agent - GitHub Docs
- Use GitHub Advanced Security with AI coding agents - GitHub Docs
Related questions
- Can Copilot code review run repo-specific setup before a PR review?
- Can my coding agent review its own pull request first?
- Small PRs Beat One Big PR for Coding Agents
Not the question you had?
Ask it. Every source gets fetched and checked before anything goes up, so it takes a day or two, and questions that cannot be answered honestly do not get a page at all.
Everyone here builds with AI, and says so
DevConnect is for developers who use AI and are honest about it. The interesting part is not that the code was generated, it is what you did with it afterwards.