GitHub Copilot's Agent Merge Finishes Pull Requests in VS Code

GitHub CopilotView original changelog

GitHub Copilot introduced Agent Merge in VS Code 1.136, a public preview feature that keeps an agent working on a pull request after the initial code is written. It addresses review feedback, fixes failed checks, resolves merge conflicts, and reruns workflows automatically, repeating the cycle until the pull request is ready to merge. Developers turn it on with the chat.agentMerge.enabled setting, then start it from the Agents window or an "Agent Merge" button in the title bar for an active session. The feature extends GitHub Copilot's reach further into the pull request lifecycle, beyond writing code toward getting it merged.

Key Takeaways

  • Agent Merge automates the "last mile" of a pull request, handling review feedback, failed CI checks, and merge conflicts that previously required a developer to step back in after an agent finished writing code.
  • The feature repeats its fix-and-recheck cycle rather than making a single pass, continuing to rerun workflows until the pull request is genuinely ready to merge.
  • It responds to comments from both human reviewers and Copilot's own automated PR reviewer, so agent-authored feedback loops don't require a separate manual step.
  • Agent Merge ships as a public preview behind the chat.agentMerge.enabled setting, meaning GitHub may still change its behavior before general availability.
  • It can be triggered per session from the Agents window or a dedicated title-bar button, rather than applying globally to every pull request.
  • The feature lands alongside other VS Code 1.136 agent-workflow changes, reinforcing GitHub's broader bet that agent sessions, not single prompts, are becoming the core unit of development work.

Closing the Gap Between "Code Written" and "PR Merged"

Getting an AI agent to write a pull request is only part of the job; getting that pull request across the finish line still usually falls back to a human chasing down review comments, flaky CI failures, and merge conflicts. GitHub Copilot's new Agent Merge feature, shipped in VS Code 1.136 as a public preview, targets exactly that gap. Rather than stopping once code is written, an agent session with Agent Merge enabled keeps monitoring its associated pull request and keeps working until it is actually mergeable.

What Agent Merge Actually Does

Once active, Agent Merge watches a pull request for blockers and works through them automatically. It addresses unresolved review threads and changes-requested reviews, including new comments left by repository maintainers or by GitHub Copilot's own automated pull request reviewer. It fixes failing required CI checks, and it updates a branch that has fallen behind its base branch, resolving any merge conflicts that result. GitHub Copilot repeats this cycle, rerunning workflows as needed, until the pull request clears every blocker and is ready to merge.

Turning It On

Agent Merge is opt-in and ships as a preview, so GitHub cautions that behavior may change before it reaches general availability. Developers enable it globally through the chat.agentMerge.enabled setting, then activate it per session either by running "Enable Agent Merge for Active Session" from the Agents window or by selecting the dedicated Agent Merge button in the editor's title bar.

Part of a Broader Push Into the PR Lifecycle

Agent Merge arrived alongside several other VS Code 1.136 changes that push agent sessions deeper into everyday development work, including experimental support for running Copilot and Claude agent sessions across every folder in a multi-root workspace, and a reorganized Agents window that groups related chat sessions into a hierarchy and flags which ones need attention. Taken together, GitHub frames these changes as part of a continuing shift in which an agent session, rather than a single prompt-and-response exchange, becomes the primary unit of engineering work inside the editor.