Review a pull request and address feedback with an agent
Reviewing a pull request means checking more than syntax. You need to verify behavior against requirements, catch edge cases or regressions, respond to reviewer comments, and resolve failing CI checks before merging.
In this guide, you open a pull request in an isolated worktree in the Agents window, review the diff with an agent, turn findings into code edits or GitHub review comments, fix failing checks or review feedback, and sync the verified branch.
Prerequisites
Project: Your GitHub-backed repository. Harness: Copilot. Interface: Agents window (or Chat view for read-only review).
- Set up GitHub Copilot and sign in to GitHub.
- Open a local clone of a GitHub-backed repository with an open pull request and working local test commands.
- Review the recommended security baseline before letting an agent run commands on an existing repository.
Pull requests from forks aren't supported by New Session from Pull Request and don't appear in the picker. For a fork pull request, fetch the branch locally or paste the pull request URL into a chat for read-only analysis.
1. Start a session from the pull request
Start a dedicated session from the pull request so the agent has the pull request description, diff, and comments in an isolated worktree that tracks the pull request branch without disturbing your current working tree.
-
Open the Agents window and group the sessions list by workspace.
-
Hover over your repository, expand the + (New Session) menu, and select New Session from Pull Request.

-
Select the pull request you want to review or update.
The session opens in an isolated worktree tracking the pull request branch, with the pull request title and its changed files shown in Changes.
If you only want a read-only review without checking out the branch in a worktree, open a new chat in the Chat view or Agents window, paste the GitHub pull request URL into your prompt, and ask your review questions there.
2. Review the diff and check for risks
Inspect the pull request changes yourself while using the agent to surface potential bugs, missing tests, and unintended edits. Keep Manual permissions selected while reviewing so the agent asks before running commands.
-
Open the Changes panel in the Secondary Side Bar (⌥⌘B (Windows, Linux Ctrl+Alt+B)) and select Branch from the changeset dropdown so you see the full pull request diff rather than only the latest turn.

-
Ask the agent to perform a read-only risk review before editing any files:
Review the changes in this pull request without editing any files. Identify logic bugs, missing edge cases, regressions, security risks, and missing test coverage. Cite exact files and line numbers for each finding. -
Check every finding against the actual diff in Changes. Select Mark as Reviewed in a file's toolbar as you finish inspecting each file.
-
For complex or high-risk changes, optionally ask for a read-only second opinion from a complementary model with Rubber Duck Rubber Duck is experimental and might change or be removed. :
/rubber-duck What failure modes or backward-compatibility risks are missing from this review?
An agent review helps you identify blind spots faster, but it isn't proof that the pull request is correct. Verify claims directly against the code and test suite.
3. Turn findings into code fixes or PR comments
When you spot an issue in the diff, choose whether you want the agent to edit the branch or publish a review comment on GitHub:
| Your role | Action in Changes | What happens |
|---|---|---|
| Author updating your own pull request (or an agent-generated branch) | Select lines in the diff, add inline feedback, and select Submit Feedback. | Sends all inline comments to the agent, which edits the files in the worktree and resolves each comment. |
| Reviewer commenting on a teammate's pull request | Select lines in the diff, select Add Feedback, and select Add PR Comment Pull request comments in the Agents window is experimental and might change or be removed. . | Publishes the review comment to GitHub without changing files or sending a prompt to the agent. |
For detailed steps and settings for Add PR Comment ( chat.experimental.agentsWindowPRComments ), see Provide feedback and request revisions.
4. Address review comments and failing CI checks
If the pull request already has reviewer feedback or failing checks, address them in bounded steps so every fix stays reviewable.
-
Ask the agent to inspect the open review comments or failing checks and propose or apply focused fixes:
Inspect the unresolved review comments and any failing checks on this pull request. Address the valid issues with minimal, focused changes, add or update tests for each fix, and run the relevant test suite. Report what changed and what passed. -
If a CI failure only reproduces in logs that the agent can't fetch directly, paste the failing log output into the prompt or attach the saved log file with Add Context > Files.
-
Inspect the resulting edits in Changes (use Last Turn to check the latest fix, then switch back to Branch to verify the full pull request diff).
Optional shortcuts for checks and review comments
When managing multiple active pull requests in the Agents window, you can also use these built-in workflows:
- One-click session-list actions Sessions list inline actions is experimental and might change or be removed. : Enable sessions.list.inlineActions to run Fix Checks, Address Comments, or Fix Checks & Address Comments directly from a session row without switching conversations. See Fix checks and address comments from the sessions list.
- Automated blocker monitoring Agent Merge is experimental and might change or be removed. : Enable agent merge to monitor a pull request for review comments, CI failures, or merge conflicts. Review its safeguards carefully because enabling agent merge switches the session to Autopilot with Assisted permissions and pushes updates to the pull request branch.
5. Verify, commit, and sync the pull request
Before pushing updates to the pull request branch, verify the final state yourself.
-
Select Terminal in the session activity bar and run the project's required tests, linter, and build commands in the worktree.
ImportantThe Commit action in the Agents window runs
git commit --no-verify, which skips localpre-commitandcommit-msghooks. Run required checks before committing. -
Open Changes, select Uncommitted from the changeset dropdown, review every modified file, and select Commit.
-
Select Sync Changes in the title bar to push your new commits to the existing pull request branch on GitHub.
-
Confirm that CI checks pass on GitHub and reply to or resolve addressed review threads. When the pull request is merged, mark the session as done so its temporary worktree is cleaned up.
Next steps
- Review and revert agent changes for inline diff feedback, checkpoints, and undo controls.
- Work with pull requests in the Agents window for creating pull requests and configuring agent merge.
- Delegate two tasks without mixing their changes to run parallel worktrees and integrate the combined result.