Skip to content

Review what your agents changed before it reaches main.

An agent’s work is a branch like any other. Read its diff against main, run its tests, and give it precise feedback on the lines you want changed.

Applies to Claude Code, Codex, OpenCode, Cursor Agent, Gemini CLI and any CLI agent5 min read

By hand

In the agent’s worktree: what is not committed yet, the uncommitted edits, what it has committed, and the committed change against main, as a summary and in full. Three dots compare the branch with the point where it left main, so you see only the agent’s work, even after main has moved on.

Terminal
cd ~/code/payments-api-refund-retries
git status --short
git diff HEAD
git log --oneline main..HEAD
git diff main...HEAD --stat
git diff main...HEAD

git diff does not show a new file’s contents: open each file git status --short marks ??. Only commits land, so have the agent commit what should stay, until git status --short prints nothing.

Giving feedback

Agents act best on feedback that names a file and a line. Write it the way you would in a code review, and paste it into the chat:

Your message to the agent
src/refunds/retry.ts, line 16: add jitter here, about ±20%,
so retries from one batch of refunds don’t all land at once.

Collect every comment first and send them in one message. Each message starts another turn, and an agent mid-turn may already be changing the code you are commenting on.

Landing it

Land from the main checkout, where main is, and go on only if git status --short prints nothing there. Run the tests on the squashed result, since main may have moved, and stop if any step fails. git commit takes your name, a message, and a co-author line if you want one.

Terminal
cd ~/code/payments-api
git switch main
git status --short
git pull --ff-only
git merge --squash refund-retries
pnpm test
git commit
git push origin main

With Dockazor

Changes ⌘1 shows what the worktree changed: its uncommitted edits, or everything against main. Click a line’s number to leave a comment. Comments collect in the Comments tab, and Send to Builder types one line into the chat, pointing the agent at your comments.

  • Commits lists what the agent committed, by agent.
  • Preview ⌘5 shows the worktree’s running page, and you can pin a comment on an element there too.
  • Merge into main… takes the committed work and lands it as one commit under your name, or keeps its commits. It runs your checks command first and asks it to pass, names the agent as co-author if you leave that on, and pushes to origin when the project has one.