Overview
When agit 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.
Prerequisites
- A coding agent CLI installed and logged in (Pi, Claude Code, Codex, or Cursor;
CODING_AGENT=autopicks 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 inopensre:
What happens
- 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.
- 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.
- 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.
- 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.
- It asks to commit the merge and push the branch, following your
/autolevel, then does both. Unrelated changes you had in the working tree stay uncommitted. While a merge is in progress the shell refusesgit commit,push,checkout,resetandmergetyped by the assistant, so the merge only changes through this flow. - 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: falsein 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, ortrunk. - Review the side-by-side view before approving when your
/autolevel asks.