Skip to main content
When an open merge request or pull request (MR/PR) conflicts with its target branch, CloudThinker flags it. With Auto-resolve conflicts on, it also resolves the conflict on a separate branch and opens a follow-up MR/PR for you to review and merge, so you don’t have to rebase by hand.

Prerequisites

  • A repository connected in Review setup on GitHub, GitLab, Bitbucket, or AWS CodeCommit. Azure DevOps isn’t supported.
  • The workspace Admin role to change the setting (see Roles).
  • A provider connection that can push new branches and open MR/PRs. On GitHub, GitLab and Bitbucket, the write scopes in Provider authentication cover this. On AWS CodeCommit, add codecommit:GitPush and codecommit:CreatePullRequest to the setup script’s policy, following the steps under What the script creates in AWS CodeCommit.
  • On GitLab, a webhook with Push events enabled, on top of the usual triggers (see Configure webhooks). GitHub, Bitbucket and CodeCommit send target-branch pushes with the webhook setup you already have.

Turn on auto-resolve

1

Open Review settings

Go to Review → Settings and find the General section. Its settings apply to every repository in the workspace.
2

Switch on Auto-resolve conflicts

Turn on Auto-resolve conflicts.Success state: the switch stays on. The next time an open MR/PR conflicts with its target branch, CloudThinker posts a status comment on it.Turning it on doesn’t scan MR/PRs that already conflict. CloudThinker acts on one the next time it gets an event for it (see the table below).
These events start a conflict check: Each resolution is an agent run and uses credits (see usage and credits). The setting controls only whether CloudThinker resolves conflicts. Detection is always on: a conflicting MR/PR gets a red Conflict badge on Review → Reviews either way.

How resolution works

A conflict usually appears after someone pushes to the target branch (or your source branch) and the two no longer merge cleanly. CloudThinker then:
  1. Posts a CloudThinker Conflict Resolution In Progress comment on your MR/PR.
  2. Creates a branch from your MR/PR’s source branch, named cloudthinker/mr-<MR/PR number>-thread-resolve-conflict-<provider>-<project id>-<MR/PR number>, and merges the latest target branch into it. For MR !42 in GitLab project 1234, that’s cloudthinker/mr-42-thread-resolve-conflict-gitlab-1234-42. It never rebases, so your history stays as it is.
  3. Resolves each text conflict with an agent edit, and keeps your MR/PR’s side when a file was renamed, deleted, added on both sides, or is binary.
  4. Checks that the result contains the latest commits from both branches, then pushes it.
  5. Opens a follow-up MR/PR titled fix: resolve merge conflicts for <your MR/PR> that targets your source branch, and links it from the status comment and the Resolution MR (or Resolution PR) link on the Reviews list.
CloudThinker never merges for you and never force-pushes your branch.
For renamed, deleted, both-added and binary files, the target branch’s version is dropped. The follow-up’s description doesn’t list those files, so find them yourself, check each one in the follow-up diff, and test the agent’s text resolutions before you merge.
To list every conflicting file and its kind, run a trial merge locally and undo it:

Merge the follow-up

1

Open the follow-up MR/PR

Click the link in the status comment, or Resolution MR next to the MR/PR on Review → Reviews.
2

Review the resolution

Read the diff the way you’d read any change. CloudThinker doesn’t run a code review on its own follow-up branches, so wait for your CI to pass on the follow-up before you merge. The follow-up targets your source branch, not your default branch, so if your CI doesn’t run on MR/PRs into feature branches, test it locally.
3

Merge it into your source branch

Merge it on your provider.Success state: your original MR/PR shows as mergeable again, and the Conflict badge clears once the provider rechecks it.
Merge the follow-up with a merge commit, on any provider. Squash and rebase merges both drop the merge history your provider needs to see the original conflict as resolved. If your branch rules allow only squash or rebase, merge the follow-up branch into your source branch locally with git merge and push.

Status comments

CloudThinker keeps one status comment on your MR/PR and edits it in place:
CloudThinker Conflict Resolution Complete comment on a GitLab merge request, linking to the follow-up MR

The status comment on a GitLab MR once the follow-up is ready

If the target or source branch moves again while the follow-up is still open, CloudThinker updates the same follow-up MR/PR in place. If you already merged the previous follow-up, it opens a new one. Auto-resolve isn’t a mention command. @cloudthinker-ai autofix fixes review findings, not conflicts (see Mention commands).

Troubleshooting

Cause: the switch is hidden in two cases: your repositories are on Azure DevOps, which isn’t supported, or auto-resolve isn’t available in your workspace yet. Your role doesn’t hide it. Fix: on Azure DevOps, resolve conflicts on your provider as usual. Otherwise, ask CloudThinker support.
Cause: your workspace role isn’t Admin, so the row shows On or Off instead of a switch. Fix: ask a workspace Admin to turn it on.
Check: auto-resolve is on and the MR/PR is open. CloudThinker only acts on MR/PRs it already tracks, so it must have received a webhook for that MR/PR.Fix: push a commit to the MR/PR’s source branch. That sends CloudThinker a new event, and it checks for conflicts before it reviews.
Cause: something interrupted the run before it could push, such as a network error. Fix: the next push to the source or target branch retries, and the same comment switches back to In Progress. If you can’t wait, resolve the conflict on your provider.
Cause: the follow-up was squash-merged or rebase-merged. Fix: resolve the remaining conflict on your provider, and next time merge the follow-up with a merge commit.

Next steps

Review workspace

Spot conflicting MR/PRs and open their follow-ups from the Reviews list.

Mention commands

Fix review findings from MR/PR comments with autofix.