Use cases · Engineering

AI code review on every pull request with Claude Code and Codex

Both Claude Code and Codex can review a pull request and leave inline comments on GitHub. You can run a review yourself, have it start automatically, or give an AI employee the job of reviewing whatever lands on the board. This page covers the commands for each, the review rules worth writing down, what the reviewers won't do, and how to make review a standing job rather than something you remember to ask for.

Three ways to get AI review on a pull request

OptionHow it startsWhere it runsGood for
Claude Code /code-reviewYou run it, with a PR number; --comment posts inline commentsYour own Claude Code session, any planReviewing your branch or a PR before you merge
Claude Code Review (managed)An organization Owner turns it on for repositories; anyone can comment @claude reviewAnthropic's serviceTeams on Claude plans that want reviews on request
Codex code review@codex review in a PR comment, or Automatic review in Codex settingsOpenAI's cloudTeams on ChatGPT plans; flags P0 and P1 issues on GitHub
An AI employeeA review issue on the board, or every PR it's assignedYour own Claude Code or Codex, on a heartbeatA standing job: every PR reviewed, follow-ups tracked

How to review a pull request with Claude Code or Codex

  1. Claude Code: run /code-review

    In a Claude Code session, /code-review finds bugs in your branch's changes; pass a PR number to review that pull request and --comment to post the findings on GitHub as inline comments. --fix applies them to your working tree instead. /review is an alias.

    # Claude Code: review a pull request and post inline comments
    /code-review 142 --comment
    
    # Codex: ask for a review in a PR comment on GitHub
    @codex review
    @codex review for issues in the database migration
  2. Codex: mention @codex review

    In a pull request comment, write @codex review; Codex reacts with 👀 and posts a review. Add a focus after it if you want one. To review without asking, turn on Automatic review in Codex settings and choose the trigger.

  3. Write your review rules down

    Codex reads a ## Code Review Rules section from the AGENTS.md closest to the code. For Claude Code, put the same rules in CLAUDE.md. Rules make reviews consistent and keep them off topics your linter already covers.

    ## Code Review Rules
    - Flag missing tests for new branches in billing/ and auth/.
    - Any SQL migration needs a rollback; say so if it doesn't have one.
    - Don't comment on formatting; the linter handles it.
    - Approve nothing and request changes on nothing: comment only.

Source: Claude Code docs, review locally with /code-review

What AI review won't do

  • Approve or block: Claude's managed Code Review never approves or blocks a pull request, and a good review brief tells an employee to comment only.
  • Replace the person who owns the change: it catches bugs and missing tests; product and design calls stay with people.
  • See everything: Codex on GitHub flags only P0 and P1 issues to keep comments focused. Ask for a specific focus when you need one.
  • Cost nothing: reviews use your plan's usage. Review on request, or on ready-for-review, rather than on every push.

Step by step for Claude Code and Codex

The built-in commands, the tools to connect and the schedule for each agent: Claude Code code review and Codex code review.

With Crewmark

Make review someone's job

Commands review when someone remembers to run them. An AI employee reviews because it's the job: Crewmark turns your Claude Code or Codex into an engineer that wakes on a heartbeat, picks up pull requests waiting for review and comments on them.

  1. Start from the role

    The AI software engineer, with your review rules in its brief.

  2. Route reviews to the board

    Assign it review issues, or add a recurring issue to review every open pull request marked ready.

  3. More engineering jobs

    See Claude Code for engineering and Sentry error triage.

FAQ

How do I review a pull request with Claude Code?

Run /code-review <PR number> --comment in a Claude Code session to post findings as inline comments on GitHub. Without --comment it reports in the session; --fix applies the fixes locally.

Is /review the same as /code-review in Claude Code?

Claude Code's docs list /review as an alias of /code-review.

How do I get Codex to review a pull request?

Comment @codex review on the pull request, or turn on Automatic review in Codex settings so reviews start on the trigger you choose. Code review has to be enabled for the repository.

Can I give the AI reviewer our team's rules?

Yes. Codex reads a ## Code Review Rules section in AGENTS.md; for Claude Code, put the same rules in CLAUDE.md.

Will the AI approve or merge pull requests?

Claude's managed Code Review never approves or blocks, and you should keep merging with people. An AI employee's brief should say to comment only.

Checked against Claude Code's code review docs and OpenAI's Codex code review docs on November 10, 2026.

Every pull request reviewed, without anyone remembering to ask.

Crewmark turns Claude Code and Codex sessions into AI employees with roles, goals, working hours and a heartbeat.