FJAN Logo

GitHub Copilot App on Azure DevOps: Who Approves the Agent?

Publicatiedatum

Leestijd

10 minuten

Delen

Illustration of an AI agent carrying a pull request along a branch line toward a merge gate guarded by two human reviewers with an approval shield
Profile photo of Funs Janssen

Geschreven door Funs Janssen

Software Consultant

Ik ben Funs Janssen. Ik ontwikkel software en schrijf over de beslissingen die daarbij komen kijken: architectuur, ontwikkelmethoden, AI-tools en de zakelijke impact van technische keuzes. Deze blog is een verzameling praktische aantekeningen van echte projecten: wat schaalbaar is, wat misgaat en wat in blogvriendelijke voorbeelden vaak over het hoofd wordt gezien.

The GitHub Copilot app now works with Azure Repos. A developer can hand a task to an agent, watch it create a branch, commit, open a pull request, answer review comments, and with Agent Merge switched on, complete the PR on its own once your checks pass. That last part is the one worth slowing down for.

The agent acts as the developer who started the session. The PR is theirs, the pushes are theirs, and any approval clicked in the app is theirs. So the honest question for a tech lead is not "is the agent good enough?" but "what in my setup stops a PR from merging with nobody but its own author having looked at it?"

In this post I walk through what the public preview does today, the ten-minute setup, the exact branch policy settings I would change before anyone enables Agent Merge, and the control at the other end that most teams forget: the work item the agent builds from.

What the Copilot app does with Azure Repos today

What's in the public preview

The integration is in public preview and switched off by default. According to the GitHub Docs page on managing Azure DevOps work in the Copilot app, it is available on Copilot Business, Enterprise, and Individual plans. Once connected, an agent session can:

  • Clone an Azure Repos repository and work on it locally
  • Create a branch, change code, commit, and open a pull request
  • Show the PR's checks and comments inside the app
  • Address a single review comment when you click Fix
  • Run Agent Merge: address review feedback, fix CI failures, resolve conflicts, and complete the PR once Azure DevOps checks and policies pass, without a separate confirmation

Several sessions can run in parallel, which is the real productivity pitch: one developer supervising three agents instead of writing one change.

What's missing

The limitations matter as much as the features:

  • No cloud sessions for Azure DevOps repositories. Everything runs on the developer's machine.
  • No repository allowlist. There is no setting to restrict the integration to selected repos. Access is whatever the user's Azure DevOps permissions allow.
  • No separate audit log. Actions show up in Azure DevOps under the signed-in user's name.
  • Work items are only partly there. With the Remote MCP Server added, Copilot can find work items and start a session from a description. Native work item views and starting sessions from a work item are still on Microsoft's roadmap.
  • Signing out is not revoking. Signing out removes local tokens; revoking access goes through Microsoft Entra.

Also keep in mind that code, PR diffs, review comments, and build log excerpts can all end up in the model's context. Your existing Copilot model and data policies still apply, so check them before rollout.

Setting it up in ten minutes

Enable the integration and add your Microsoft account

In the Copilot app, open Settings, go to Experimental, and enable Azure DevOps integration. Then under Accounts, add the Microsoft account you use for Azure DevOps. For Business and Enterprise plans, your GitHub admin must keep the Copilot app policy enabled.

Add the Azure DevOps Remote MCP Server

Microsoft recommends adding the Remote MCP Server via Customize, Installed, Add server, then choosing Azure DevOps and optionally your organization name. This is what gives the agent work item, pipeline, and project context beyond the repo itself. The Microsoft Learn docs on the Remote MCP Server list every tool and mark which ones can write. I covered the permission side in more depth in connecting AI agents safely to the Azure DevOps MCP Server. Note that it supports Azure DevOps Services only, not on-premises Azure DevOps Server.

Connect a repo and run a first local session

Next to Sessions, click the add icon, choose Add Azure DevOps repository, type your organization name, and pick the repo. Start a session in it with a small, boring task first: a dependency bump or a missing unit test. Watch which tool calls the session asks you to approve and which it runs without asking. Creating a PR and resolving review threads may run without a prompt, depending on your settings.

The identity problem: the agent is you

Here is the part the announcements skip. In Azure DevOps, the agent does not have its own identity. When Sanne starts a session:

  • Sanne is the PR creator
  • Sanne is the most recent pusher, every time the agent pushes a fix
  • Sanne's name is on every reply, resolved thread, and completion
  • If Sanne clicks Approve in the app, that is Sanne's vote

Now combine that with a common, years-old branch policy: minimum one reviewer, and "Allow requestors to approve their own changes" ticked because the team was small. Sanne approves the agent's PR, Agent Merge sees all policies green, and the PR completes. Every log entry says a human created, reviewed, and merged it. Technically true. Practically, nobody reviewed it.

None of this is a bug in the Copilot app. It does exactly what your policies allow. Which means your branch policies are now your agent governance, whether you planned it that way or not.

Branch policies that hold up against Agent Merge

All of these live under Repos, Branches, your protected branch, Branch policies. The Microsoft Learn branch policy reference documents each one.

Stop requestors approving their own changes

Untick Allow requestors to approve their own changes. The creator can still vote Approve, but the vote no longer counts toward the minimum number of reviewers. This single setting closes the scenario above. If you use automatically included reviewers, check the same option on each of those entries too.

Prohibit the most recent pusher from approving

Tick Prohibit the most recent pusher from approving their own changes. This matters because Agent Merge keeps pushing: it fixes CI, resolves conflicts, addresses comments. Each push makes the delegating developer the most recent pusher, so their vote stops counting. This is segregation of duties, and with agents it stops being a compliance nicety.

Reset votes when new commits land

Under When new changes are pushed, choose Require at least one approval on the last iteration or reset approval votes. Without this, a reviewer approves iteration two, the agent pushes iteration five to fix a failing test, and the old approval still counts. You want a human to have seen the code that actually merges.

Make build validation required, not optional

Agent Merge treats failing checks as something to fix. That is useful, and it is also how a test gets "fixed" by loosening an assertion. Make build validation required with a sensible expiry, and add Check for comment resolution as required. Be aware the agent can resolve threads itself, so a resolved thread no longer proves the reviewer agreed. Reviewers should re-read the diff, not the thread status.

Add required reviewers for sensitive paths

Use automatically included reviewers with path filters for files where a quiet change does real damage: pipeline YAML, infrastructure code, authentication, and test helpers. A short CLI check helps you see where you stand across repos:

1az repos policy list --repository-id <repo-id> --branch main --output table

And to set the minimum reviewer policy with creator votes excluded and resets on push:

1az repos policy approver-count create --repository-id <repo-id> --branch main --minimum-approver-count 1 --creator-vote-counts false --reset-on-source-push true --allow-downvotes false --blocking true --enabled true

While you are in there, check who holds Bypass policies when completing pull requests. Anyone with that permission can, in principle, delegate past every rule above. Keep it to a named handful of people.

The other control: the work item is the agent's brief

Policies decide what is allowed to merge. The work item decides what gets built. With the Remote MCP Server connected, Copilot can pick up a work item and start a session from its description. If that description is "export is broken for some customers", the agent will guess, and Agent Merge will push the guess until CI is green.

I argued the general case in guarding AI development at the work item, not the PR, and showed what GitHub Copilot actually reads from your Azure Boards items. With Azure Repos now in the loop, that advice applies to far more teams.

What an agent-ready work item contains

An agent-ready item is just a good item, written slightly more literally:

  • Outcome in one sentence: "CSV export includes invoices with a credit note, ordered by date."
  • Testable acceptance criteria: Given/When/Then, or a numbered list a test can assert.
  • Scope boundaries: which module to change and, just as important, what not to touch.
  • Test expectation: "Add a regression test in ExportServiceTests for the credit note case."
  • Non-goals: "Do not change the export file format."
  • Links: the bug it came from, the related story, the design note.

If a new developer could not start from the item without asking a question, an agent cannot either. It just won't ask.

Writing them without slowing refinement

This is the part I built ClearSpecs AI for. It works inside Azure DevOps Boards on the work item itself: it rewrites a vague story into one with clear acceptance criteria, summarizes long bug threads, and generates child tasks from a parent story. Teams can define custom prompt templates centrally, so an "agent-ready" template with the sections above becomes one click for every product owner instead of a wiki page nobody opens. The chat panel queries live work items, so you can ask it which items in the current sprint have no acceptance criteria before anyone hands them to an agent.

Making "Done" checkable

The last gap is the definition of done. A PR merging does not mean the work is done, especially when an agent merged it. With the Checklist extension for Azure DevOps you can attach a checklist template to a work item type, with items like "agent PR reviewed by someone other than the requestor" and "regression test added", and block the transition to Done until they are ticked. I described that pattern in making Done mean done in Azure DevOps Boards.

A two-week rollout plan for one team

Week 1: pilot without Agent Merge.

  1. Pick one repository with decent test coverage.
  2. Apply the five branch policy changes above and audit bypass permissions.
  3. Let two developers enable the integration and the Remote MCP Server.
  4. Only use work items that meet the agent-ready checklist.
  5. Merge manually. Note every time the agent misread the item.

Week 2: Agent Merge on low-risk work.

  1. Allow Agent Merge on dependency bumps, test additions, and small bug fixes.
  2. Review every merged agent PR in the next standup: what did it change to make CI pass?
  3. Turn the misreads from week 1 into template sections in your work item format.
  4. Decide, as a team, which item types are never agent-merged.

After two weeks you have data instead of opinions, and a policy set you can roll out to the next repo.

Conclusion

The Copilot app makes agent work in Azure Repos practical for the first time, and Agent Merge removes most of the waiting between "PR opened" and "PR merged". It also removes the moment where a human used to notice something was off. Since the agent acts as the developer who started it, your branch policies decide whether a second person ever looks at the code, and your work items decide whether the agent built the right thing at all.

Fix both ends before you scale: no self-approval, no pusher approval, reset votes on push, required builds, path reviewers. Then make every item you hand to an agent specific enough that a stranger could build it. If you want that second part without adding hours to refinement, try ClearSpecs AI free on the Visual Studio Marketplace and run your next sprint's stories through an agent-ready template.

Frequently asked questions

Reacties

Nog geen reacties. Wees de eerste om te reageren.

Plaats een reactie

Profile photo of Funs Janssen

Geschreven door Funs Janssen

Software Consultant

Ik ben Funs Janssen. Ik ontwikkel software en schrijf over de beslissingen die daarbij komen kijken: architectuur, ontwikkelmethoden, AI-tools en de zakelijke impact van technische keuzes. Deze blog is een verzameling praktische aantekeningen van echte projecten: wat schaalbaar is, wat misgaat en wat in blogvriendelijke voorbeelden vaak over het hoofd wordt gezien.

Inhoud