AI agents
Sign in

Topics

Backend

Tools & DevOps

All guides

Search

Topics

Practice

AI in development · AI agents

AI code review: how to set it up without drowning in comments

Author: Volodymyr Pichkurov Published: 5 min read

An AI reviewer reads the whole diff in a minute, finds a forgotten permission check and notices that a new query runs inside a loop. But switch it on "as is", and within a week the team stops reading its comments: there are too many, half are about style, and the important ones get lost.

Below is how AI reviewers work as of December 2026, how to set them up and how to fit them into your process so they help instead of making noise.


What AI review catches and what it misses

Good at:

  • logic errors: swapped conditions, forgotten branches, wrong boundaries;
  • missing checks: access rights, validation, null;
  • common vulnerabilities: SQL injection, XSS, unsafe handling of files and secrets;
  • performance problems: queries in a loop (N+1), needless loading;
  • departures from the project rules, if you wrote them down.

Bad at:

  • the point of the task: does the code do what the business needs;
  • agreements that are not in any file: "we will delete this module soon", "this is intentional";
  • architectural decisions for the future.

Hence the main rule: AI checks, a person decides.


The tools as of December 2026

Claude: Code Review and commands in Claude Code

  • Code Review for GitHub — Team and Enterprise plans. An admin turns it on in the organization settings (Claude Code → Code Review), installs the Claude GitHub app and picks the repositories.
  • When it runs: once after a pull request is created, after every push, or manually with the comment @claude review.
  • What it does: leaves comments on lines. It does not approve or block pull requests.
  • Rules: CLAUDE.md and a separate REVIEW.md at the repository root.
  • Price: billed by usage separately from the plan, about $15–25 per review on average; a monthly cap is set in the settings.
  • Locally, before the pull request: Claude Code has /code-review, a multi-agent cloud check /code-review ultra (3 free runs on Pro, Max and Ultra, then usually $5–25) and /security-review for vulnerabilities.

(Code Review setup, ultrareview)

Codex (OpenAI)

  • Turning it on: connect the repository to Codex and enable automatic review in the Code Review settings.
  • On demand: the comment @codex review in a pull request; @codex security review runs a security check (preview).
  • What it does: a regular GitHub review; on GitHub it flags only serious issues — levels P0 and P1.
  • Rules: a ## Code Review Rules section in AGENTS.md; AGENTS.md files in subfolders apply to their folders.

(Codex and GitHub, custom review rules)

GitHub Copilot

  • Running it: assign Copilot as a reviewer; automatically — through settings or branch rulesets ("Automatically request Copilot code review"), optionally again on new pushes.
  • Depth: Lite, Balanced (default) and Max levels.
  • Rules: .github/copilot-instructions.md, .github/instructions/*.instructions.md files for specific paths, and AGENTS.md.
  • Approval: by default a Copilot review does not count toward required approvals — that is a separate setting.
  • Price: paid Copilot plans; a Balanced review costs roughly $0.25–5.

(Copilot code review, setup)

Bugbot in Grok Build (formerly Cursor)

  • Running it: automatically on every pull request update, or with the comment bugbot run.
  • What it does: comments on bugs, security and quality problems with suggested fixes; Autofix can hand the fix to a cloud agent.
  • Rules: .cursor/BUGBOT.md (at the root and in subfolders). The editor's usual .cursor/rules do not apply to Bugbot.
  • Note: from 7 December the GitHub mention changes from @cursor to @build.

(Bugbot)


Fitting AI review into your process: 6 steps

  1. Automation without AI first. Style, formatting and types are checked by linters and tests in CI: for Laravel that is Pint, PHPStan (Larastan) and your tests. The AI should not spend comments on whitespace.
  2. Write a rules file. Briefly: what matters in your project and what the reviewer should not comment on. An example is below.
  3. Choose when it runs. "After every push" costs more and is noisier; "once on creation" plus a manual run before merging is usually enough.
  4. A person decides. Do not give the AI reviewer rights to approve or merge. Its comment is a reason to look, not an order.
  5. Triage the comments. Fix what matters, close false ones with a short reason.
  6. Teach the reviewer. If a false finding repeats, add a line to the rules file. In a couple of weeks the noise drops noticeably.

An example rules file for a Laravel project

This text works for REVIEW.md, a ## Code Review Rules section in AGENTS.md, or .github/copilot-instructions.md:

markdown
## Code Review Rules

Focus on (comment only when you are confident):
- Authorization: every controller action and job that touches user data checks policies or ownership.
- Validation: request data is validated before use; no raw $request->all() into models.
- Database: no queries inside loops (N+1) — use eager loading; long operations run in transactions.
- Migrations: backward compatible with the running code (no dropping columns still in use).
- Security: no raw SQL with user input, no secrets in code, uploads go to object storage.
- Tests: new behaviour has a feature test.

Do not comment on:
- Formatting and code style (Pint runs in CI).
- Types PHPStan already checks.
- Naming, unless it is misleading.

Risks people rarely mention

  • Instructions in someone else's text. An AI reviewer reads the pull request description, the comments and the code. In a public repository someone can hide an "instruction" for the model there. So the reviewer should have no secrets and no merge rights, and its output should be comments only. More in the article on MCP server security.
  • False confidence. "The AI checked it" does not mean "no bugs". It is an extra pair of eyes, not a guarantee.
  • Cost. A review on every push in an active repository quickly adds up. Set a monthly cap where the tool has one.
  • The code goes to the provider. The diff is sent to the chosen service's cloud. Check whether its data retention terms suit you.

Where to start

Take the tool you already have: if the team is on Claude — Code Review or /code-review locally; on ChatGPT — @codex review; on GitHub Copilot — assign it as a reviewer. Write a short rules file, set it to run "once on creation" and after two weeks see how many comments were useful.

Which agent to choose for everyday work — in the comparison "Claude Code, Grok Build or Codex". And if your team has several agents, the DevSense team space helps.

Features and prices are taken from the official pages as of 2 December 2026.

Was this guide helpful?

Read next

// team space · beta

Agents of the whole team on one board

Your agents and your teammates' agents claim files, post to a shared numbered board and take tasks from the sprint. Each gets only what is new. Free in beta.

How it works

// Newsletter

New AI in development guides by e-mail

One e-mail a week with new guides on AI in development. No spam, unsubscribe in one click.

About the author

Volodymyr Pichkurov View portfolio

Spotted a mistake? Suggest an edit

Help us improve this article. Suggest edits, additions, or corrections.

No suggestions submitted yet. Be the first to share your feedback!

On this page