Auto fix conflicts
Resolved 💬 3 comments Opened Mar 31, 2026 by DisabledAbel Closed May 10, 2026
💡 Likely answer: A maintainer (github-actions[bot], contributor)
responded on this thread — see the highlighted reply below.
What variant of Codex are you using?
Web
What feature would you like to see?
It seems that codex falls into conflicts a lot for example branch has conflicts that must be resolved
Use the web editor or the command line to resolve conflicts before continuing.
README.md
index.html
This happens all the time and I don't understand why because I didn't edit any files
Additional information
_No response_
3 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Why this happens
Codex creates its branch from a snapshot of
mainat task start. Ifmainmoves forward before Codex finishes (even a README edit or an auto-generated commit), the PR lands with conflicts — even though you never touched those files. It's a race condition between Codex's branch base and the currentmain.Workaround that worked for me
I created a GitHub Actions workflow that auto-resolves conflicts by merging
maininto the Codex branch with-X theirs(keeping Codex's changes):Key things that tripped me up:
permissions: contents: writeis required or the push silently fails with 403git configmust come before the merge step, not just before the commitactions/checkout@v5to avoid the Node 20 deprecation warningWould love to see Codex handle this natively — maybe by rebasing its branch on
mainright before opening the PR.This feature request hasn't received enough upvotes, so I'm going to close it.