Best practices / Ship a feature every week

Reviewing agent-written code without a team

Ask for proof first, read for intent, get a fresh-context review, and enforce your never-list in config.

Intermediate · 5 steps · 6 sources · Updated

The problem

There is no colleague to catch a confident wrong change. Agents produce diffs faster than you can read them. If you skip the diff because the agent said the tests passed, you are the outage.

The workflow

  1. 01

    Ask for proof before you read a line

    Ask the agent for the command it ran and its output, not a summary that says tests pass. Each change should come with a test that fails if you revert the implementation. No proof, no review: send it back.[1][2]

  2. 02

    Read the diff against your spec, not your taste

    Code that started from your own spec is much less work to review, because you already chose the problem and the approach. Ask: does this do what the spec said, and nothing else? Ask the agent for small commits, one logical change each, so you can step through the history.[3][4]

  3. 03

    Get a second review from a context that did not write it

    In Claude Code, /code-review checks the diff in a fresh subagent that never saw the conversation. Ask it to check the diff against SPEC.md and skip style, or it will invent findings to fill the list. Anthropic's Code Review app for pull requests (Team and Enterprise plans) likewise never approves or blocks a merge. Treat findings as questions; you decide.[1][5]

  4. 04

    Put your never-list in config, not in your head

    Rules with no exceptions belong in hooks and deny rules, not in CLAUDE.md, because the harness enforces them whatever the model decides. Typical entries: block reads of .env, block edits to the migrations folder, typecheck before the agent may stop. Keep the list short; each rule will sometimes fire when it should not.[1]

  5. 05

    Click through the change yourself before you merge

    If you have not seen the code do the right thing, it does not work yet. Run it in a preview environment or locally, try the happy path, then one edge case. This is the step an agent cannot take for you, because you are the one accountable.[2][6]

Pitfalls

  • Asking the authoring session to review its own work, when it still carries the reasoning that produced the code.
  • Fixing every finding a reviewer agent lists, which leaves you with extra abstractions and tests for cases that cannot happen.
  • Trusting an agent's summary that the checks passed instead of reading the actual output.

Sources

  1. Best practices for Claude Code, AnthropicA reviewer that’s asked to find problems will always find something
  2. Your job is to deliver code you have proven to work, Simon WillisonThat test should fail if you revert the implementation.
  3. Embracing the parallel coding agent lifestyle, Simon Willison
  4. Reviewing and Testing Code, Cursor
  5. Code Review, Anthropic
  6. Vibe engineering, Simon Willison