[Github Agent] Add merge conflict resolution action - #2975
Draft
George Ng (GeorgeNgMsft) wants to merge 9 commits into
Draft
[Github Agent] Add merge conflict resolution action#2975George Ng (GeorgeNgMsft) wants to merge 9 commits into
George Ng (GeorgeNgMsft) wants to merge 9 commits into
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Use the existing Reasoning action to resolve conflicted files, then verify and create the merge commit without pushing. Remove the per-action readiness framework added by the earlier implementation. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
George Ng (GeorgeNgMsft)
marked this pull request as draft
September 4, 2026 20:13
Use current Copilot built-in tool filters, including model-specific editors and shell lifecycle tools. Cover deterministic merge completion and real Git conflict handling with regression tests. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: fb5bc7a3-4119-4f6d-a71b-f928f2490ffa
Use the host-authorized repository and propagate request cancellation. Bind completion to the actual merge state and staged paths, preserving automatic rename resolutions. Consolidate Git probes and regression fixtures, and add an installed SDK tool contract check. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: fb5bc7a3-4119-4f6d-a71b-f928f2490ffa
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR lets the GitHub agent merge another branch into the current local branch and resolve conflicts without requiring a connected editor. Ask “resolve merge conflicts from main”, or omit the branch to use the remote's default. TypeAgent fetches the source branch and starts the merge. Clean merges are committed directly; when conflicts occur, Reasoning uses native file and terminal tools to resolve and stage them, then a separate completion action verifies the index and creates the merge commit. The action never switches branches or pushes.
The implementation also fixes the tool configuration that previously left Reasoning unable to edit files or run Git, causing repeated failed attempts and timeouts. Completion no longer depends on the model remembering to call a final action or merely claiming success. Both merge actions use the repository authorized by the host request, rather than the agent server's working directory.
The optional
targetBranchis the source, not the destination. To mergemainintorelease, first check outrelease, then ask “resolve merge conflicts from main.” MCP clients can invoke the same action directly.Highlights
HEADandMERGE_HEAD; missing, invalid, or stale state requires manual inspection and recovery.Validation