Agentic review
However much of the code an agent writes, the one who checks it in the end is a person (for now).
So let the agent help with the review too. This page goes through one change with Claude in the review: you open the review, Claude gives a tour of it and comments on its lines, you answer on the lines, Claude fixes what you asked for, and you read the new difference. It needs the Emacs MCP server on (ecc-mcp-enabled).
The review here is in ediff, with ecc-review-style set to 'ediff. The diff buffer review works with the same keys.
Claude has made a change
Section titled “Claude has made a change”A turn has ended, and Claude has changed a file. The transcript says what it did.
Open the review
Section titled “Open the review”C-c c D D opens the review of what the session changed. In ediff it takes the frame: the old side above the new one, and Claude’s reply pane beside them, where its answers appear while the session is out of sight.
The other way in is to ask in plain words, such as “walk me through this in the review”. Claude opens the review only when asked, and as the diff buffer: it does not start ediff itself.
Take the tour
Section titled “Take the tour”T in the review asks Claude for a tour of the changes, most important first, and sends it the hunks of the review. At each stop Claude scrolls the review to the change, explains it in a few sentences in the reply pane, puts a comment under each line that needs your attention, ▎ #2 Claude: text, and waits. t asks for the next stop and tells Claude where you are. Talking to Claude from the review has the details.
Answer on the lines
Section titled “Answer on the lines”In either window of the review:
| Key | Action |
|---|---|
c |
Comment on the line at point, the old line in the old window and the new one in the new; on a line with only Claude’s comment, reply to it |
M |
Ask Claude about something; with the region active, about the selected lines |
C-c C-c |
Send your comments as one prompt; the review stays open |
y |
Answer what Claude is waiting for, shown in the reply pane: a permission, a question or a plan |
M goes out at once. Comments wait until C-c C-c, so you can read the whole difference first and send everything together.
Claude answers in the review
Section titled “Claude answers in the review”Claude can reply under each of your comments, indented beneath it, and remove a comment of yours once it has dealt with it. It cannot write or change your comments. What it says besides appears in the reply pane. a hides Claude’s comments when you want to read the code alone.
Claude fixes, and the review follows
Section titled “Claude fixes, and the review follows”When Claude edits a file, the open review reads the files again: when a tool finishes, when the turn ends, and when you save a file of the repository. The comments are kept, and so are the current difference and the place of each side. A comment whose line is gone is marked [outdated]. Read the new difference, and comment again if needed. Following the files has the details.
Finish
Section titled “Finish”When the difference says what you want, q or C-c C-k closes the ediff review with its comments and gives back the windows you had before. In the diff buffer the two differ: q buries the review and keeps its comments, and C-c C-k drops it and its comments. To start the next review clean, ask Claude to clear its comments.