# Working with agents

See what changed while you were away, review it, and keep your own edits safe.


An agent edits files in your folder while you look at something else. Rip shows you what it touched and keeps your unsaved work out of its way. It also gives you a place to review the result.

## Changed while you were away

A file that changed on disk while you looked elsewhere gets a dot. The dot shows in the file tree and on the tab. In an open file, the lines that changed get a tint in the gutter. The tint stays until those lines have been on screen while the window had focus.

A file with no unsaved edits reloads from disk on its own.

## Your edits stay yours

A file can change on disk while you have unsaved edits in it. Rip then merges three ways: your edits, the change on disk, and the text both started from. Edits that touch different lines merge without a question.

Edits that overlap become conflict regions in the buffer, with both versions marked. <kbd>secondary-alt-m</kbd> jumps to the next conflict and <kbd>secondary-alt-shift-m</kbd> to the previous one. <kbd>secondary-alt-y</kbd> keeps your version of the region, and <kbd>secondary-alt-t</kbd> takes the version from disk. A save never writes over what the agent wrote: Rip merges first.

## Review what the agent did

Before the agent starts, press <kbd>secondary-alt-shift-g</kbd> to mark a baseline. When it is done, press <kbd>secondary-alt-g</kbd>. The review shows everything that changed since the baseline, new files included, even when the agent committed along the way.

In the review, <kbd>a</kbd> accepts a hunk, which stages it and folds it away. <kbd>x</kbd> reverts a hunk. <kbd>c</kbd> leaves a note. When you are done, <kbd>e</kbd> copies every note as Markdown, ready to paste back to the agent. [Git and review](/docs/git-and-review.md#review-changes) lists the other keys.

## Hot exit

Quitting never asks about unsaved files. Rip saves a snapshot of each unsaved buffer in the background and again when you quit. The next time a window opens on that folder, the buffers come back. Rip merges them with any change the agent made on disk in between. Set `hot-exit = false` to get the question back.

## Keys

| Keys | What happens |
| --- | --- |
| <kbd>secondary-alt-shift-g</kbd> | Mark a baseline. |
| <kbd>secondary-alt-g</kbd> | Review changes since the baseline. |
| <kbd>secondary-alt-m</kbd> / <kbd>secondary-alt-shift-m</kbd> | Next or previous conflict. |
| <kbd>secondary-alt-y</kbd> | Keep your version of a conflict. |
| <kbd>secondary-alt-t</kbd> | Take the version from disk. |

## Settings

| Key | What it changes |
| --- | --- |
| `hot-exit` | Whether quitting skips the question about unsaved files. |
