Skip to content

Lesson 6 - Merging with Agent Merge

Your filtering feature is built, verified, and seen working in a browser. The last step is to merge it. You’ve merged twice already in this harness — both times you opened the pull request and merged it yourself on github.com. This time you’ll let the app do the heavy lifting with Agent Merge, which shepherds a pull request through its whole lifecycle from inside the app.

In this lesson, you will:

  • learn what Agent Merge is and how it automates the merge lifecycle.
  • enable Agent Merge on your filtering session.
  • watch it create the pull request, run CI, and merge when everything is green.

Over the last few modules you’ve explored various levels of automation, from creating code to allowing Copilot to validate a UI directly. To further speed development, Tailspin Toys would like to see if there’s a way pull requests that have been vetted and validated can automatically be merged.

Agent Merge allows automation of the last mile of landing a pull request via Copilot app. When you enable it, the app’s session reads your pull request, addresses what’s blocking it — fixing failing CI checks, responding to review comments, rebasing when needed — and merges it as soon as GitHub allows. It runs in the background, survives app restarts, and turns itself off once your pull request is merged.

Up to this point you’ve been the one clicking Merge pull request on github.com. Agent Merge shifts that responsibility to the agent so you can move on to the next task while it shepherds the PR through to completion. You still review and approve the work — the agent just handles the mechanical finish line.

You’ve reviewed the code manually, run tests, and even allowed Copilot to validate the UI. Now it’s time to merge the new code into the codebase! Let’s allow agent merge to shepherd the PR through continuous integration (CI) and to merge.

  1. Return to the session you had open from the previous module where you were adding filtering functionality.

  2. In the upper right-hand corner, select the dropdown next to Create PR.

  3. Select Agent merge to enable agent merge.

    The Create PR dropdown in the GitHub Copilot app expanded, with an arrow pointing to the Agent merge option

  4. The button text now changes to Agent merge.

  5. Select the Agent merge button to view options the agent can take to manage the PR, like checking its merge status, CI check status, and if there are any unresolved comments.

The Agent merge panel

  1. Allow agent merge to merge the pull request by selecting the dropdown next to Agent merge then Merge pull request.

    The Agent merge dropdown showing the agent's allowed actions — Address reviews, Fix CI failures, Resolve conflicts — with an arrow pointing to Merge pull request

  2. Once all CI processes are green (meaning the tests passed), Copilot will merge the pull request!

You’ve automated several parts of the development process, including generating code, testing and validating code, and now the pull request process. You:

  • learned what Agent Merge is and how it automates the merge lifecycle.
  • enabled Agent Merge on your filtering session.
  • watched it create the pull request, run CI, and merge when everything was green.

Next, you’ll explore canvases — a richer way to plan and visualize work with the agent. Continue to Lesson 7 - Planning with canvases.

What does Agent Merge automate, and what responsibility does the developer retain?

Check your answer

Agent Merge handles the mechanical pull-request finish line: monitoring checks and reviews, addressing blockers, resolving conflicts when possible, and merging when GitHub allows. The developer still reviews the code and decides whether the change is acceptable. Automation removes coordination work, not ownership of code quality.

Go deeper: Manage pull requests with Agent Merge.

Reset all workshop progress?

This clears completed lessons and checked task items stored in this browser. This action cannot be undone.