Skip to main content

Overview

When a git merge stops on conflicts, ask OpenSRE to resolve them. It hands the conflicted files to your installed coding agent, checks that no conflict marker or unmerged path is left, shows you each conflict side by side, then commits the merge and pushes the branch to the one it tracks, so the pull request updates. Files the agent cannot settle are named back to you and the merge stays open, so you decide them together and run it again.
This is a mutating tool: it edits the conflicted files in your repository, creates the merge commit, and pushes your branch. It never aborts a merge and never pushes to a protected branch such as main. Whether it asks before the commit and push follows your /auto level (see below).

Prerequisites

  • A coding agent CLI installed and logged in (Pi, Claude Code, Codex, or Cursor; CODING_AGENT=auto picks the first ready one)
  • The repository checked out locally, with the merge already started or a branch name to merge

Use it

Start the merge yourself, or let OpenSRE start it, then ask in opensre:
Any decision you give (“keep our version of config.py”) is passed to the coding agent word for word.

What happens

  1. OpenSRE reads the unmerged paths of the merge in progress in the current directory. With no merge in progress, it merges the branch you named first.
  2. It prints one table per conflicted file right away: each conflict hunk with your side and their side, so you see what is disputed before anything runs.
  3. The coding agent resolves every file on its own, as Claude Code or Cursor would. While it works, each step it takes is printed under the running tool (“Reading migrations.py”, “Editing migrations.py”, “Running: uv run pytest …”), so you can see what it is doing and stop it with ESC at any point. A decision you stated in your request (“take main’s version of config.py”) is applied by git instead, and “decide file by file” opens a menu per file (keep ours, take theirs, combine, or type what you want). Lockfiles are regenerated from the resolved manifest, never merged by hand.
  4. OpenSRE verifies that no conflict marker or unmerged path remains and prints the table again with the merged result. A file the agent could not settle comes back as a menu showing both sides, and the merge waits.
  5. It asks to commit the merge and push the branch, following your /auto level, then does both. Unrelated changes you had in the working tree stay uncommitted. While a merge is in progress the shell refuses git commit, push, checkout, reset and merge typed by the assistant, so the merge only changes through this flow.
  6. When the branch has an open pull request on GitHub, it waits for that pull request’s checks (up to 15 minutes) and reports whether they passed, which ones failed, or whether another commit replaced the merge. Pass wait_for_checks: false in your request to skip the wait. Without a GitHub origin, a GitHub token, or an open pull request, the checks are reported as not watched.

Approval and unattended runs

The commit and push are one approval, recorded as the shell’s /auto level: Run /auto med when you want to review before anything leaves your machine. After a decline, ask again (“commit and push the merge”) once you are happy; the coding agent is not run a second time.

Troubleshooting

Security

  • The merge commit is authored and committed as the OpenSRE Agent GitHub account, so the pull request shows who made it.
  • The push goes to the branch your checkout tracks, never to main, master, develop, or trunk.
  • Review the side-by-side view before approving when your /auto level asks.