# Merge Review UI

### What is the Merge Review UI?

The Merge Review UI is the control center for keeping:

* The **agent’s branch** inside its container, and
* Your **local Git branch**

in sync.

{% embed url="<https://www.youtube.com/watch?v=uGOtGhlaUxQ>" %}

You'll use it to bring agent work into your repo (**Pull**) or send your local commits into the agent's container (**Push**).

> **Mental model:**\
> **Pull = get what the agent did**\
> **Push = give the agent your latest local changes**

***

### Where it lives

Open any agent session and click **Merge Changes** in the left sidebar.\
You’ll see:

* **Agent branch** (in the container)
* **Local branch** (on your machine)
* Buttons for **Push** and **Pull**

![Merge Review UI Location](https://3805321663-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjFN3RamrZpFlLcWLQKea%2Fuploads%2Fgit-blob-365be30d88643c189cdbce492d829e7aaf555f32%2Fmerge-review-ui-location.png?alt=media)

***

### Pulling changes (most common)

Use **Pull** when the agent has completed work and your local repo hasn’t diverged.

1. Agent finishes a task and commits in the container.
2. Local repo is unchanged.
3. Click **Pull**.

Git fast‑forwards or clean‑merges the agent’s branch into your local branch.

***

### Pushing changes (send your edits to the agent)

Use **Push** when you’ve made local commits the agent should know about.

Examples:

* You edited code locally while the agent was running
* You added fixes
* You want the agent to continue from your latest commit

If edits don’t overlap, Git auto‑merges.\
If they touch the same lines, you’ll see a conflict.

***

### Handling merge conflicts

If both sides changed the same lines, Git reports a conflict and Sculptor shows an error.

![Merge Conflict Error](https://3805321663-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjFN3RamrZpFlLcWLQKea%2Fuploads%2Fgit-blob-73acea4c9718d353bb87089017285db4b1e506f3%2Fmerge-conflict-error.png?alt=media)

To resolve:

1. Turn on **Pairing Mode**
2. Open the conflicted file in your editor
3. You'll see markers like:

   ```diff
   <<<<<<< HEAD
   YOUR LOCAL CHANGE
   =======
   AGENT'S CHANGE
   >>>>>>> sculptor-merge-source
   ```

Resolve manually or ask the agent:

> “Resolve the conflict in `README.md` and keep my version.”

Once resolved:

1. Commit inside Sculptor
2. Click **Pull** to sync the clean state back locally

***

### When to use Push vs Pull

**Use Pull when:**

* You want to bring the agent’s work into your repo
* You haven’t made conflicting edits
* The agent just finished a task

**Use Push when:**

* You’ve made local commits the agent should build on
* You want to sync histories
* You need the agent to resolve conflicts

***

### Summary

The Merge Review UI keeps local Git and container Git aligned. It’s meant to:

* Make agent changes easy to merge
* Let agents build on your commits
* Surface conflicts safely
* Keep histories clean

For working directly with the agent’s files, see [Pairing Mode](https://docs.imbue.com/core-concepts/core-concepts/pairing-mode).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.imbue.com/features/features/merge-review-ui.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
