Skip to content

Review an agent's work like a pull request

An agent hands you a branch with 40 changed files. Reading them in alphabetical order is not a review. You also have questions a pull request tool would help with: did it do what I asked, or did it also reformat three files? What changed since I told it to fix things? Do the tests it wrote check anything? And once you spot two lines you dislike, you do not want to copy them into a terminal and type an explanation.

The merge queue already runs your tests and flags suspicious patterns. This page is about the part that stays with you: reading the work. Everything below happens on your computer, on the branch, and changes nothing on it.

All of it sits in the merge dossier: the dialog that tells the story of a branch. It opens when you press Merge into main… on an agent in the cockpit, or Merge into main on a card in the queue, and read-only when you click the label of an agent branch in the History graph. The sections below appear in that dialog, in that order, unless they say otherwise.

Some of the help comes from Claude and some does not. The sections say which. Where Claude is involved, a sentence is only ever a hint: the diff itself stays the proof.

Check what was asked against what was done

Section titled “Check what was asked against what was done”

Under Request and diff the dossier compares the request of the agent with the diff. The request is what the agent wrote down with record_intent after its commits (see the MCP page). If there is no recorded request, this section does not appear.

Without Claude, the app uses fixed patterns and shows a warning such as 3 files outside the files the request names, with a label per file:

  • lockfile: a lockfile such as package-lock.json changed;
  • only reformatted: only whitespace changed in the file;
  • other folder: the file lies in another folder than the files and folders the request names.

This is a warning, never a block. A request like “clean up the module” legitimately touches many files, and the label says outside the files the request names, not wrong. If the request names no file or folder, there is no other folder label, but lockfiles and reformatting are still flagged.

Compare with Claude goes one step further, if you have an API key. It sends the request and the diff to Anthropic (without secrets, see What is sent to Claude) and gets two lists back: Part of the request and Not part of the request, with one sentence per file. Only files that are really in the diff are shown. The answer is not kept: press Compare again when the branch moved. Only the diff per file goes along, not a summary of file names. This check has no preview window: if the repository is set to always show what is sent, it refuses instead.

Under Reading order the files of the branch are sorted in a fixed order, so you meet the core first:

  1. Production code
  2. Tests
  3. Lockfiles
  4. Only reformatted

Tick the box in front of a file when you have read it. Only unread hides what you finished, and the line on top says how many files are left. If a file changes after you ticked it, for example in the next round, it becomes unread again and says changed since you read it. These marks are kept on your computer, per branch, and never in a commit.

The button Why are these here? asks Claude for one sentence per file, based on the commit subjects and a piece of the diff. It uses the same preview as the commit message: you can look at the exact text first (see What is sent to Claude). The sentence stands next to the number of changed lines; if it does not match the diff, believe the diff.

The same list is available in Compare: choose Reading order above the files when the right-hand side is a local branch.

Spotted two lines you want changed?

  1. Open Compare with the agent’s branch on the right-hand side.
  2. Select one or more lines in the diff and right-click. Choose Comment on this line… (or Comment on these lines…), write your comment and press Save comment.
  3. Open the dossier of that branch. Under Your review every comment is listed, with the file, the lines and the text of those lines, and a tick box.
  4. Press Send N to agent. The comments go to the agent as one task. If Claude Code runs in a terminal in the app, the task is typed there; otherwise it is copied to the clipboard, ready to paste.

A comment stays on your computer, in the .git folder of the repository, until you press Delete on it. A comment that was sent shows a sent badge. At most 30 comments go at once; secrets in your text are removed first. It is the same mechanism as for comments from a forge.

After a few rounds you no longer know which of your comments the agent dealt with. The dossier works it out for each comment, and writes it under the comment:

  • open: the line is still there as you saw it (still open);
  • addressed: a later commit on the branch changed or removed that line, shown as addressed in the hash and subject of that commit;
  • unknown, with the reason: the app cannot follow the line, for example because the file is binary, did not exist yet when you commented, or the commit is gone after the branch was rewritten. An unknown comment is listed under Open, because it needs your attention.

The app follows the line commit by commit, also when lines move or the file is renamed. If the agent rewrote the branch, it compares the whole branch once instead, and then cannot name a commit. This is a guess from the diff, not a judgement about whether the problem is really solved, so you can overrule it: Mark addressed on an open comment, Reopen on an addressed one. A choice of yours is marked (set by you) and lapses when the commits start to agree with it.

The buttons All, Open and Addressed above the list filter the comments. Send to agent starts with only the open comments ticked, so the agent is not asked again about what it already fixed; you can still tick others.

What it does not do yet: follow a line through code that was moved to another file or merged, take answers from the agent, or let you write a comment in the dossier itself (the dossier shows no diff, so you write it in Compare).

After you sent the agent back, you do not want to read the whole diff again. Under Commits, the dossier has Compare with previous round. It runs git range-diff between the branch as it is now and as it was in the previous round. For each commit you see whether it stayed the same, changed (with what changed inside it), is new or is gone, in colour.

The previous round is the branch as it was when you last pressed Send to agent. If you never did, it is the branch as it was before it last moved, read from the reflog.

  • If the agent squashed or rewrote the commits, no commit of the old round matches one of now. The app says so and names the two tips, so you can compare them yourself.
  • It does not yet use the rounds of the merge queue as a source (the queue only keeps a count), and you cannot pick two attempts of a best-of-N run.

Tests that touch this diff lists tests that are likely to be affected by the branch, with the reason for each:

  • changed in this branch: the test file is itself in the diff;
  • name matches a changed file, as parser_test.go does for parser.go;
  • changed with a changed file in N commits: in the history the two changed together at least twice.

The detection of test files covers Go, JavaScript and TypeScript, PHP and Python. Run these runs go test for the packages of the Go tests in the list, in the agent’s worktree. Tests in other languages are listed but not run, and the heading says how many can be run here. The result says Quick round passed or failed, with the output.

It is a quick round, not a replacement: a test that is not in the list can still break, and the full test run of the merge queue stays the last gate. The result is not stored in the queue.

An agent that makes tests green can also write tests that never fail. Two sections help you find out. Both are buttons: they take time, so they never run on their own.

This is a small mutation test. The idea: if you break the code on purpose and no test notices, the tests do not really check that line. Check the tests takes the lines the branch changed, flips a comparison on them one at a time (< becomes >=, == becomes !=) in a temporary copy, and runs the Go tests of that package. A mutation that the tests catch is fine. One that survived is a place to look. The result reads 2 of 5 mutations survived, with the file and line of each.

  • Only Go. Changed code in other languages is mentioned, not mutated. Only comparison operators are flipped.
  • Limits. At most 10 mutations by default (you can set up to 50), 2 minutes per mutation, 20 minutes in total, one run at a time per repository. Stop cancels it.
  • A survivor is a hint, not a verdict. Some changes cannot be told apart by any test, and the line may be dead code. Mutations that do not compile, time out, or lie in a package whose tests already fail are listed apart and not counted.
  • Your working folder and the agent’s branch are not touched; everything happens in a temporary worktree.

The agent that wrote the code rarely finds its own mistakes. Try to break it starts a second Claude Code agent in a throwaway worktree of the branch, with one job: write a test that fails on this change, or say honestly that it found nothing. It may only add new test files; nothing on the branch changes. It is only offered for branches that start with agent/.

When the adversary reports that it is done (or when you press Check now), the app sorts what it touched and, for Go, runs its new tests twice: on the branch and on the base the branch started from. The verdict is one of:

  • Found a test that breaks this branch: the test fails on the branch, not because of a compile error, and passes on the base. The test is shown, and you can copy it.
  • Nothing found: its tests pass on the branch.
  • Unverified: anything else, including every language other than Go.

Only the text is kept, in memory: nothing is committed, the worktree is removed afterwards, and the result is gone when you restart the app. Stop and discard ends it early. It is a second agent and uses your Claude Code, like any other agent.

When several agents work at once, two branches can merge cleanly and still not build together. That warning is part of the cockpit and described under the merge queue.

  • There is no “Request and diff” section. The agent recorded no request. Agents add one with record_intent; the dossier says so under Why.
  • Compare with Claude is missing. It needs a recorded request and an API key in Settings.
  • Run these does nothing for my tests. Only Go tests can be run. The heading says how many of the listed tests can.
  • Check the tests finds nothing to mutate. The branch changed no Go comparison. The result says Nothing to try: the changed Go lines have no comparison (< or ==) to flip, and lists what was left out.
  • Try to break it says Unverified. Only Go can be verified, and only when the adversary added a new test file that can be run.

The merge queue tests the branch and flags smells. The cockpit starts the agents. Learn from what agents get wrong turns rejections into rules for the next agent.