An AI coding agent opens a pull request to add a discount to an order summary. The checks pass and a reviewer approves it. Before the team merges, another engineer changes the shared price calculation on the main branch. The pull request now has a conflict. An agent resolves it, pushes another commit and reports that the change is ready.
The reviewer returns to a different diff. Which checks cover this version? Did the conflict resolution preserve the new calculation? Does the earlier approval still satisfy the repository's rules? The code exists, but someone still has to establish whether the team can accept it.
GitHub's 28 October release brings Agent Merge into pull requests on GitHub: Copilot can watch for failed Actions workflows, merge conflicts or both, then attempt fixes. That makes the work after opening a PR a useful engineering boundary to examine. A repair loop needs a defined scope, current evidence and a person responsible for the decision it cannot make.
The order-summary example below is an illustrative design. I have not run Agent Merge for this article or measured its repair quality. The proposed policies and acceptance cases describe how I would evaluate a bounded workflow with a team.
Separate repair, review and merging
Agent Merge and auto-merge have different responsibilities. The former works on selected blockers; the latter merges when the repository's requirements are satisfied. Enabling Agent Merge does not enable auto-merge. A team can start with repairs enabled and keep merging manual while it learns what the resulting diffs look like.
Availability also constrains that choice. Current GitHub documentation requires paid Copilot cloud access, permitted organisation policies and the repository's automations policy. It excludes fork-origin and stacked pull requests. Check the actual repository before designing a process around this feature; a conventional engineer-led repair remains a useful baseline.
I would begin with one repository and one allowed blocker category. Agree who reviews the patch, who owns a failed workflow and who can stop the watcher. That makes it possible to evaluate a specific delegation rather than asking an agent to keep changing code until the PR can merge.
Give each repair a narrow contract
For the discount change, the intended behaviour is explicit: apply the agreed discount once, preserve currency and rounding, and show the same total in the summary and checkout. Fixing a compile error must preserve those requirements. Changing a failed assertion to accept a different total needs a separate explanation and review.
I would record the blocker, PR head commit, relevant base revision, diagnostic evidence and permitted repair scope before each attempt. Protect the test expectations and workflow controls that define acceptance. A repair may need a test change when a contract intentionally changes, but that decision belongs with the engineer who owns the contract.
| Blocker | Proposed automatic scope | Decision retained by the team |
|---|---|---|
| Deterministic compile or test failure | Patch the diagnosed defect while preserving agreed behaviour | Review the diff and evidence for the intended result |
| Merge conflict | Reconcile changes where their combined meaning is clear | Resolve changed business rules or ambiguous contracts |
| Runner outage or unavailable service | Preserve diagnostics and report the dependency | Decide when to rerun; a product-code patch may be irrelevant |
| Repeated intermittent test failure | Collect the failing case and run history | Investigate flakiness before treating a later green run as a repair |
GitHub's documented repair environment uses GitHub Actions and repository customisations. I would make its setup reproducible and limit credentials to what the selected checks need. Instructions can explain the permitted repair; repository permissions and required checks must enforce the boundaries that matter. A sentence asking the agent to leave protections alone is insufficient if its credentials can bypass them.
Bind evidence to the version being accepted
A PR number identifies a conversation whose contents can change. It does not identify a fixed patch. Keep check results, repair summaries and review decisions associated with the commit or diff they actually examined. After a new push, inspect the new revision instead of carrying the old green state into the handover summary.
Suppose the initial PR head is h1 and the repair creates h2. The passing run for h1 remains useful history. It cannot establish the behaviour of h2. Check the commit attached to the new run, and distinguish checks of the branch head from checks of a temporary merge candidate. Those candidates may contain additional base-branch changes.
GitHub provides options to dismiss stale approvals or require approval of the most recent reviewable push. Choose and verify the policy deliberately. For this first rollout, I would require someone other than the patch author to examine the latest repair before merging. Document how bypass permissions affect that promise as well.
A small evidence record is enough: PR, head commit, tested candidate, workflow run, blocker, repair attempt and reviewer decision. If the base changes again, establish whether the relevant integration checks still cover the combination to be merged. Rebuilding that evidence is preferable to describing an old run as current.
Resolve the meaning behind the conflict
In the example, the discount branch expects calculateTotal() to return an integer number of cents. Meanwhile, main changes it to return an object containing an amount in cents and a currency. Both branches may edit the same caller. Removing the conflict markers only establishes that Git can store the combined text.
The useful review follows the value through its consumers. Does the discount operate on the amount exactly once? Is the currency preserved? Does the checkout use the same result as the summary? A resolution that extracts the amount but silently supplies a default currency could compile while changing the product's behaviour.
I would add or retain a focused regression around that contract, then exercise the summary-to-checkout path using the reconciled implementation. If the two changes disagree about rounding or which discounts can combine, stop and ask the responsible engineer to settle the rule. The agent should not invent a business decision to clear the conflict.
That is also why passing checks need interpretation. A suite that only asserts the presence of a formatted price may miss a calculation error. The earlier article on testing AI-built software across feature boundaries explores those application contracts; here the delivery workflow must make a changed contract visible to the next reviewer.
Stop when the next attempt needs a person
A repair loop needs an exit condition before its first failure. For a pilot, I would allow at most two automatic patch attempts for one diagnosed blocker, with a separate time or usage ceiling. These are proposed starting limits, not measured optimal values or a claim about Agent Merge's built-in settings. Check which controls the selected tool actually exposes and how the operator will enforce the rest.
Keep the count against the unresolved problem, not just the current commit. Otherwise each patch can create a new commit and appear to start a fresh allowance. A newly classified blocker needs an explicit record too, so a renamed check cannot hide the same repeating failure.
When the limit is reached, hand over the failing run, the current head, attempted diffs, remaining uncertainty and the next decision needed. Name an engineer who can accept that handover and stop further automatic edits. For an infrastructure failure, the useful next action may be waiting for the service owner. For an ambiguous price rule, it is a contract decision.
Verify the path into the target branch
A busy main branch can move while the repaired PR is under review. With strict status checks, the branch must be current with its base; with a configured merge queue, checks run against a candidate containing the latest target branch and changes ahead in the queue. Choose the integration policy that fits the repository's activity and available features.
For GitHub Actions checks required by a merge queue, configure the merge_group trigger as well as the PR trigger. A missing required result is an integration problem to investigate. It should not be solved by quietly removing that requirement so the queue can proceed.
Before enabling a watcher broadly, I would exercise a small acceptance set in a disposable repository with no production credentials. The following are expected observations for that evaluation. They have not been run for this article.
| Acceptance case | Expected evidence |
|---|---|
| A repair pushes a new commit after the first checks pass | The old run remains attached to its tested commit; current checks and required review cover the repair |
| Both branches change the price contract | The combined implementation preserves amount, currency and rounding, or explicitly waits for an engineer decision |
| A runner outage or intermittent failure repeats | Diagnostics identify the unresolved cause; retries do not create an unlimited stream of product patches |
| The same blocker exceeds the pilot budget | Automatic edits stop and a named engineer receives the current diff, runs and uncertainty |
| Main changes while the PR waits to merge | The configured integration path validates the applicable current candidate; queue checks report when required |
Track waiting time alongside active reviewer effort, repair attempts and changes reviewers had to undo. Compare similar blocker categories with the existing manual workflow. A shorter interval to merge is a weak result if the team spends more time understanding patches or repairs defects after release. Any claimed improvement needs observations from that rollout.
Give the workflow an engineering owner
My work on Slivo includes shaping the voice shopping workflow, coordinating AI-assisted development across the widget, integrations and SaaS backend, and checking the journey from recommendation to order. It is a working demonstration product. That experience is relevant to reviewing generated changes against a complete outcome; it is not evidence of an Agent Merge deployment.
For a team adopting automated PR repair, I would own the initial scope, repository-rule review, acceptance cases and investigation of failed attempts with the engineers responsible for the application. The handover should leave a reproducible check environment, clear repair boundaries, current review evidence and an operating route for work the agent cannot finish.
If your coding agents produce patches faster than the team can accept them, tell me about your team and the engineering role. Bring one PR that keeps getting stuck, the checks blocking it and who currently has to intervene. That gives us a concrete starting point for improving the path from generated code to a change your team can support.