> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cloudthinker.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Auto-Resolve Conflicts

> Detect merge conflicts on open merge requests and let CloudThinker resolve them through an automatic follow-up MR

When a merge request conflicts with its target branch, CloudThinker flags it — and, with **Auto-Resolve Conflicts** on, resolves it on a separate branch and opens a follow-up MR for you to review and merge.

***

## Detect conflicts

Detection is automatic and always on. When an open MR conflicts with its target branch, CloudThinker marks it with a **conflict badge** on the **Reviews** page. Once a follow-up MR exists, the same row links to it as **Resolution MR**.

<Frame>
  <img src="https://mintcdn.com/cloudthinker/PAPf7dQXz6G9xwkG/images/code-review/02-reviews-resolution-mr-link.png?fit=max&auto=format&n=PAPf7dQXz6G9xwkG&q=85&s=45c7e551cb931cf28823967ece458872" alt="Reviews page showing conflicting merge requests with a conflict badge and Resolution MR links" width="2364" height="1590" data-path="images/code-review/02-reviews-resolution-mr-link.png" />
</Frame>

<p style={{textAlign: 'center', fontSize: '0.9em', color: '#666', marginTop: '8px'}}>Conflicting MRs are badged on the Reviews page and link to their Resolution MR</p>

***

## Turn on auto-resolve

In **Code Review → Settings**, turn on **Auto-Resolve Conflicts**. The toggle applies to the whole workspace and controls only whether resolution runs — detection stays on either way.

<Frame>
  <img src="https://mintcdn.com/cloudthinker/PAPf7dQXz6G9xwkG/images/code-review/01-auto-resolve-conflicts-toggle.png?fit=max&auto=format&n=PAPf7dQXz6G9xwkG&q=85&s=ebe48cec51fdb99d5d337703839d329c" alt="Code Review settings with the Auto-Resolve Conflicts toggle turned on" width="2360" height="1588" data-path="images/code-review/01-auto-resolve-conflicts-toggle.png" />
</Frame>

<p style={{textAlign: 'center', fontSize: '0.9em', color: '#666', marginTop: '8px'}}>Turn on Auto-Resolve Conflicts in Code Review → Settings</p>

<Info>
  Auto-Resolve supports **GitLab**, **GitHub**, **Bitbucket**, and **AWS CodeCommit**. Azure DevOps is not supported.
</Info>

***

## How resolution works

1. CloudThinker posts a **🔄 Conflict Resolution In Progress** comment and starts an isolated run.
2. It builds a resolution branch from your MR's source, then **merges** the target branch into it — never a rebase, so your history is preserved. Structural conflicts (rename, delete, add/add, binary) keep the MR side.
3. It opens a follow-up MR targeting your source branch, titled `fix: resolve merge conflicts for <your MR>`, and updates the comment with the link.
4. You review and merge the follow-up. CloudThinker never merges for you — once it's merged, your original MR is mergeable again.

<Note>
  On GitLab, merge the follow-up MR **without squash**. Squashing drops the merge ancestry GitLab needs to see the original conflict as resolved.
</Note>

<Frame>
  <img src="https://mintcdn.com/cloudthinker/PAPf7dQXz6G9xwkG/images/code-review/03-follow-up-resolution-mr.png?fit=max&auto=format&n=PAPf7dQXz6G9xwkG&q=85&s=d9e729a0b70c25ce5aebb8fc35a01b84" alt="Follow-up merge request resolving conflicts for the original MR, with the do-not-squash reminder and a Ready to merge state" width="2376" height="1356" data-path="images/code-review/03-follow-up-resolution-mr.png" />
</Frame>

<p style={{textAlign: 'center', fontSize: '0.9em', color: '#666', marginTop: '8px'}}>Merge the follow-up MR to make your original MR mergeable</p>

***

## Status comments

CloudThinker keeps one status comment on your MR and edits it in place:

| Comment                 | Meaning                                                                            |
| ----------------------- | ---------------------------------------------------------------------------------- |
| 🔄 **In Progress**      | A run is creating or updating the follow-up MR.                                    |
| ✅ **Complete**          | The follow-up MR is ready — the comment links to it.                               |
| ✅ **Already Resolved**  | The conflict cleared on its own (for example, you rebased). No follow-up needed.   |
| ✅ **No Changes Needed** | Resolving produced no changes — your MR is usually already mergeable.              |
| ⚠️ **Failed**           | The run was interrupted. CloudThinker retries on the next push to the base branch. |

<Frame>
  <img src="https://mintcdn.com/cloudthinker/PAPf7dQXz6G9xwkG/images/code-review/04-conflict-resolution-complete-comment.png?fit=max&auto=format&n=PAPf7dQXz6G9xwkG&q=85&s=9ab1fb76151d22150d310c5490dbed8c" alt="CloudThinker Conflict Resolution Complete comment on the merge request linking to the follow-up MR" width="1692" height="454" data-path="images/code-review/04-conflict-resolution-complete-comment.png" />
</Frame>

<p style={{textAlign: 'center', fontSize: '0.9em', color: '#666', marginTop: '8px'}}>The status comment links to the follow-up MR when resolution completes</p>

***

## Good to know

* **Your branch is never touched.** Resolution happens on a CloudThinker-owned `cloudthinker/` branch; your branch and its history stay as-is, and protected branches like `main` are never pushed to.
* **Your work is preserved.** The resolver verifies the resolved diff still contains your MR's change before it pushes, and you review the follow-up MR before merging.
* **It keeps up with the base.** If the base moves again, the same follow-up MR updates in place; if it was already merged, a new one is opened.
* **Not a mention command.** Auto-resolve is fully automatic. `@cloudthinker-ai autofix` is separate — it fixes review findings, not conflicts.

***

## Related

<CardGroup cols={2}>
  <Card title="Code Review setup" icon="gear" href="/guide/code-review/setup">
    Connect your repositories for automated code review
  </Card>

  <Card title="Mention commands" icon="at" href="/guide/code-review/mention-commands">
    Interact with CloudThinker directly from PR and MR comments
  </Card>
</CardGroup>
