HerdbellBlog

Guide

AI-assisted code review on a Mac: how to check what your agent wrote

By the Herdbell team · Published · Updated

Short answerA simple AI-assisted code review workflow on Mac: ask an agent to review the diff, read it yourself, run the tests, and keep the agent's changes small.

AI agents write code fast, so the slow part becomes checking it. AI can help with that too, as long as a person still reads the result. This is a short routine that works with Claude Code, Codex and Cursor on a Mac.

A five-step review routine

  1. Keep each task small. One change per chat is much easier to review than a whole feature at once.
  2. Read the diff yourself first. Run git diff or use your editor's source control view, and check that every changed file belongs to the task.
  3. Ask an agent to review it. Claude Code and Codex both have a /review command, and you can also ask in plain words: "Review this diff for bugs, missing tests and security problems."
  4. Use a second agent for a second opinion. A different agent often notices different things. Context Bridge hands it the context in a second.
  5. Run the tests and the app. A review reads code. Only running it shows it works.

What to look for

  • Changes outside the task: files the agent touched without being asked.
  • Tests that were changed to pass instead of the code being fixed.
  • New dependencies you did not ask for.
  • Secrets, paths and settings written into the code.
  • Error handling that hides a problem instead of reporting it.

Useful tools on a Mac

  • Git and your editor's diff view, for reading each change.
  • The agent's own review command, for a first pass.
  • Pull requests on GitHub, so a teammate can review before anything is merged.
  • Herdbell, so you know the moment an agent finishes and is ready for review, without watching its window. Herdbell does not review code itself.

Common questions

Can AI review code reliably?

It is good at finding common bugs and missing tests, but it can miss problems and be confidently wrong. Use it as a first pass, then read and run the code yourself.

How do I ask Claude Code to review my changes?

Use the /review command or ask in plain words, for example "review the current diff for bugs and missing tests".

Should the same agent that wrote the code review it?

It can, but a second agent or a person often catches more, because it does not share the first agent's assumptions.