Skip to content

Reviewing changes

The changes pane is a diff of the repository that updates live. When a hooked agent finishes a turn that changed files, a changes pane on that turn opens beside it without taking focus. You can make it open in a background tab instead, or not at all:

[changes]
show_on_agent_done = "split" # "split" | "tab" | "off"

You can also open it from the files changed line on an agent’s row, or with Changes vs main in the Git panel.

The changes pane on This turn: Uncommitted, This turn, and This session along the top with Rewind and Collapse All, a list of three changed files with line counts, then each file’s diff with added lines in green and removed lines in red, and a Viewed checkbox per file

A switch along the top picks what the pane compares against:

  • Uncommitted: the working tree compared with the index and HEAD
  • This turn: everything since the agent’s current turn started
  • This session: everything since the session started

When a hooked agent starts a turn, Cortland snapshots the working tree into a temporary index under refs/worktree/cortland/turns/. Your index, HEAD, and branches aren’t touched. Because the comparison is with the working tree, a change committed in the middle of a turn still shows.

Key Action
j / k Next / previous change
J / K Next / previous file
v Mark the file viewed, then move to the next unviewed file
x Collapse or expand the file
s Stage the file, or unstage it if it’s fully staged
o Open the file in the editor
c Comment on the current change or selection

The Viewed checkbox clears itself if the file changes again. Lockfiles and diffs over 500 changed lines start collapsed.

Press c, or click a line’s gutter, to attach a note to those lines. A bar at the bottom counts your notes and sends them as one prompt, with each file, line, and quoted diff, to the agent working in that repository. If several agents are working there, you pick one. If none are, the prompt goes to the clipboard.

In the This turn and This session scopes, Rewind restores the working tree to the snapshot after one confirmation. Modified and deleted files get their content back, and files created since the snapshot are deleted. HEAD, branches, commits, and the index stay as they are.

  • Notify the agent is on by default. It tells the agent what was restored, so it re-reads the files before continuing.
  • Undo Rewind restores the tree once.
  • Both are disabled while the agent is working.

In the built-in editor, ⌘LCtrl+Shift+L sends the selected lines to the agent working in that file’s repository, with the path, line range, and an instruction you type.