What Is AI Code Review? How It Works, What It Catches, and How to Choose a Tool
AI code review is software that reads a pull request and comments on bugs, security issues and risky changes before a human reviewer does. How it works, how it differs from static analysis and Copilot, what it misses, and how to pick a tool.
AI code review is software that reads a pull request, reasons about what the change does, and leaves comments on bugs, security problems and risky behavior before a human reviewer looks at it. It runs automatically when a PR is opened or updated, posts its findings as inline comments on the diff, and in some tools can open a fix, block a merge, or approve a low-risk change. The difference from a linter or a static analyzer is that AI code review judges intent and behavior ("this change breaks the caller in another file") rather than matching a fixed rule ("this variable is unused"). It does not replace human review. It takes the first pass so that people spend their review time on design and product decisions.
TL;DR
- AI code review is an automated reviewer on every pull request. It reads the diff, pulls in surrounding code, and comments on likely bugs.
- Two architectures dominate. Diff-only tools see the changed lines. Codebase-aware tools also see callers and dependencies across the repository.
- It is not static analysis and not a linter. Those apply fixed rules. AI code review reasons about behavior. Most teams run all three.
- Judge tools on precision and recall together. A tool that comments on everything finds more bugs and wastes more time. Macroscope publishes its own benchmark at /blog/code-review-benchmark.
- Pricing models differ more than prices. Some tools charge per developer seat, some charge per review. Macroscope charges $0.05 per KB of diff reviewed, with $100 in usage credit to start.
What is AI code review?
AI code review is an automated reviewer, built on large language models plus code analysis, that comments on pull requests the way a careful teammate would. A developer opens a PR on GitHub. The tool receives a webhook, reads the change, gathers the context it needs, and posts a review: a summary of what the PR does, inline comments on specific lines it thinks are wrong, and sometimes a suggested fix.
What defines the category is that it reasons about behavior, not syntax. It can say "this function now returns null on the error path, and the handler in another file dereferences it," and it says so on every PR, with no queue and no reviewer on vacation.
How does AI code review work?
AI code review works in three steps: gather context, analyze the change, and post findings back to the pull request. The step that separates tools is the first one. What the model sees determines what it can catch.
Step 1: Gather context
Diff-only review sends the changed lines, and maybe the rest of the changed files, to a model. It is simple and fast, and it catches local mistakes well: an inverted condition, a missing await, an off-by-one in a loop.
Codebase-aware review builds a representation of the whole repository first. Macroscope, for example, reads each change and then explores the surrounding code in the repository. When a PR changes a function signature, the reviewer can follow it to the callers, including callers in files the PR never touched. That is how AI code review catches bugs across files that a diff-only reviewer cannot see.
Step 2: Analyze the change
The model, given the diff plus context, looks for behavior that is wrong rather than code that is ugly:
- Logic errors: wrong conditions, unhandled cases, broken invariants.
- Contract breaks: a changed return type, a renamed field, a removed parameter that callers still use.
- Security problems: injection paths, missing authorization checks, secrets in code.
- Error handling: swallowed exceptions, retries that never stop, failures that look like success.
Step 3: Report back
Findings land as inline comments on the GitHub PR review, usually with a summary at the top. Better tools add workflow on top of the comment:
- Fixes. Macroscope's Fix It For Me opens a fix PR, runs CI, and iterates until tests pass.
- Merge gates. Check Run Agents let a team write custom checks in plain-English Markdown that run as GitHub check runs and can block a merge.
- Approvals. Approvability auto-approves low-risk PRs and escalates risky ones to a human.
AI code review vs static analysis vs linters vs human review: what's the difference?
Linters enforce style rules, static analyzers enforce correctness rules, AI code review reasons about intent and behavior, and human review decides whether the change is the right change. They overlap less than people assume, and the strongest setups use all four.
| Linter | Static analysis | AI code review | Human review | |
|---|---|---|---|---|
| What it checks | Formatting, naming, unused code | Known bug and vulnerability patterns | Behavior, intent, cross-file impact | Design, product fit, tradeoffs |
| How it decides | Fixed rules | Fixed rules plus data-flow analysis | Model reasoning over code and context | Judgment and domain knowledge |
| Understands intent | No | No | Partly, from code, PR description and context | Yes |
| Finds novel bugs | No | Only if a rule exists | Yes | Yes, when attentive |
| False positives | Rare, predictable | Common without tuning | Varies widely by tool | Low, but misses are common on large PRs |
| Speed | Instant | Seconds to minutes | Minutes | Hours to days |
| Best at | Consistency | Known vulnerability classes | Logic and integration bugs | Architecture and "should we do this" |
Keep the linter and static analysis. Add AI code review for the class of bug nobody wrote a rule for. Keep humans for the decisions only humans should make.
What does AI code review catch, and what does it miss?
AI code review is strongest on concrete, checkable bugs in the code it can see, and weakest on questions that depend on context outside the repository.
What it catches well
- Cross-file breakage, when the tool is codebase-aware: a changed signature, a renamed enum value, a removed field still read elsewhere.
- Edge cases a tired reviewer skims past: empty lists,
nullreturns, timezone boundaries, integer overflow. - Error-handling gaps: exceptions swallowed, errors logged and then ignored.
- Security basics: unparameterized queries, missing authorization on a new endpoint, credentials committed to the repo.
What it misses or handles poorly
- Product and design judgment. Whether the feature should exist, or whether this is the right abstraction.
- Requirements it cannot see. A business rule that lives in a spec document, a Slack thread or someone's head.
- Runtime-only behavior. Production load and infrastructure configuration are mostly invisible from a diff. Integrations with logs and error trackers (Macroscope connects to Sentry and GCP logs, among others) help, but only partly.
This is why the right framing is "AI first pass, human final call," not "AI instead of humans."
What types of AI code review tools are there?
AI code review tools fall into three groups: review built into a platform you already use, dedicated review products, and review tied to an AI editor. The group matters because it determines the pricing model and how deep the review goes.
Built-in: GitHub Copilot code review
GitHub Copilot includes code review as one feature of a broad coding assistant. Copilot Free ($0) does not include code review. The paid individual plans are Pro at $10/month, Pro+ at $39/month and Max at $100/month, and code review consumes GitHub AI Credits from the plan's monthly allowance. For a deeper comparison see Macroscope vs GitHub Copilot code review.
Dedicated: Macroscope, CodeRabbit, Greptile
Dedicated tools exist only to review code, so they compete on detection quality, noise and workflow.
- Macroscope is codebase-aware, using full-repository context for cross-file bug detection. Pricing is usage-based: $0.05 per KB of diff reviewed with a 10 KB minimum per review (a $0.50 floor), no per-seat fees, no seat minimums and no annual commitment. Every new workspace gets $100 in usage credit. Spend caps default to $10 per review and $50 per PR and are adjustable. It is GitHub only today (no GitLab or Bitbucket) and has no self-hosted option. See /pricing.
- CodeRabbit is priced per developer: Essentials at $24/developer/month billed annually or $30 billed monthly, Team at $48 annually or $60 monthly, Advanced at $72 billed annually, and custom Enterprise. Each plan has a per-developer hourly review limit, and reviews past it are pay as you go at $0.25 per reviewed file. Public repositories are reviewed free. See Macroscope vs CodeRabbit and CodeRabbit alternatives.
- Greptile has a free Starter plan for 1 active developer with 50 credits/month, and Pro at $30 per seat per month with 50 credits included per seat and $1 per extra credit. Enterprise adds self-hosting and GitHub Enterprise. If you need self-hosting, Greptile is a reasonable choice and Macroscope is not. See Macroscope vs Greptile and Greptile alternatives.
Bundled with an editor: Cursor Bugbot
Cursor Bugbot is code review bundled with Cursor. On a Cursor team it reviews every contributor to the repositories you enable. It has no standalone published price: individual Cursor plans list Bugbot on usage-based billing, and Teams plans ($40/user/month) include agentic code reviews with Bugbot. If your whole team already lives in Cursor, Bugbot is the path of least resistance. See Cursor Bugbot vs Macroscope.
Quick comparison
| Tool | Type | Pricing model | Published starting price |
|---|---|---|---|
| GitHub Copilot | Built-in | Per user plan, review uses AI Credits | Pro $10/month (Free tier excludes review) |
| Macroscope | Dedicated, codebase-aware | Usage-based, per KB of diff | $0.05/KB, $100 usage credit to start |
| CodeRabbit | Dedicated | Per developer seat | $24/dev/month annual, $30 monthly |
| Greptile | Dedicated | Per active seat plus credits | Free Starter, Pro $30/seat/month |
| Cursor Bugbot | Bundled with Cursor | Usage-based or in Cursor Teams | Teams $40/user/month |
How do you evaluate an AI code review tool?
Evaluate an AI code review tool on two numbers at once: how many real bugs it finds (recall) and how many of its comments are worth reading (precision). Optimizing for either alone is easy and useless: comment on every line and you find more bugs while training the team to ignore you.
Recall: does it find real bugs?
Macroscope ran its own benchmark on 118 real production bugs across 8 languages (Go, Java, JavaScript, Kotlin, Python, Rust, Swift, TypeScript). Results:
| Tool | Bugs detected | Detection rate |
|---|---|---|
| Macroscope | 57/118 | 48.3% |
| CodeRabbit | 54/118 | 45.8% |
| Cursor Bugbot | 50/118 | 42.4% |
| Greptile | 17/72 | 23.6% (evaluated on 72 bugs) |
| Graphite Diamond | 21/115 | 18.3% |
This is Macroscope's own benchmark, so treat it as one input and read the methodology at /blog/code-review-benchmark. The top three are close, and no tool catches most bugs, which is another reason human review stays.
Precision: is it worth reading?
Recall without precision is noise. Macroscope's Code Review v3 raised overall review-comment precision to 98%, up from 75%, while posting 22% fewer comments overall. Fewer, better comments is the goal for any tool you evaluate.
A practical trial
- Install on a real repository, not a demo repo.
- Replay merged PRs that later caused incidents and see which tools flag the bug.
- Count comments you would have acted on versus comments you would have dismissed.
- Check the workflow fit: fixes, merge gates, approvals, integrations.
- Model the cost at your PR volume, not your headcount. See AI code review cost per pull request.
- Check security posture. Macroscope is SOC 2 Type II, does not train models on customer code, and encrypts data at rest and in transit. Ask every vendor the same questions.
How do you set up AI code review on GitHub?
Most AI code review tools add to GitHub code review as a GitHub App, so setup is: install the app, pick repositories, open a PR. Here is the Macroscope version; others follow a similar shape.
- Install the GitHub App and grant access to the repositories you want reviewed.
- Open or update a pull request. The review posts automatically as a GitHub PR review with inline comments.
- Set guardrails. Adjust the per-review and per-PR spend caps, set a monthly budget, and turn off auto-review by repo or label. Exclude generated or vendored files.
- Add team rules as Check Run Agents if you want custom checks that can block merges.
- Connect your tools, such as Slack, Jira, Linear and Sentry, for more context.
- Review before you push, optionally, with the Macroscope CLI and its plugins for Claude Code, Codex, Cursor and OpenCode.
Full walkthrough: how to set up AI code review on GitHub. Qualified non-commercial open-source projects can use Macroscope free; see /open-source.

Is AI code review worth it?
For most teams shipping on GitHub, yes, as long as the tool is precise enough that people read its comments. The value is a consistent first pass on every PR, including the ones a busy reviewer would have skimmed, plus earlier detection of cross-file bugs that are expensive once merged.
It is most clearly worth it when:
- PR volume is outgrowing reviewer capacity, especially as coding agents open more pull requests per developer.
- The codebase is large enough that no single reviewer holds all of it in their head.
It is less compelling for a small team on a small codebase where every PR already gets a careful read. Either way, noise is the real cost, which is why precision belongs at the top of your evaluation.
Frequently Asked Questions
What is AI code review?
AI code review is an automated reviewer that reads each pull request, reasons about what the change does, and comments on likely bugs, security issues and risky behavior before a human reviews it. It complements human review rather than replacing it.
Is AI code review actually worth it?
Usually, yes, if the tool is precise. The benefit is a consistent first pass on every PR and earlier detection of cross-file bugs. The risk is noise, so pick a tool on precision and recall together. Macroscope's Code Review v3, for example, reports 98% review-comment precision, up from 75%.
What's the difference between AI code review and static analysis?
Static analysis applies fixed rules, such as known vulnerability patterns and data-flow checks, and only finds what a rule describes. AI code review uses a model to reason about what the code is supposed to do, so it can flag bugs nobody wrote a rule for, like a caller in another file that breaks when a return type changes. Static analysis is more predictable. AI code review is broader. Many teams run both.
What's the difference between AI code review and Copilot?
GitHub Copilot is a coding assistant that includes code review as one feature, billed through Copilot plans and GitHub AI Credits. Dedicated AI code review tools such as Macroscope, CodeRabbit and Greptile exist only to review code, and compete on detection quality, noise and workflow features like fix PRs, merge-blocking checks and auto-approval. Copilot is convenient. A dedicated tool usually goes deeper.
Should I use AI code review instead of peer review?
No. Use it before peer review. AI code review is good at concrete bugs in the code it can see. People are better at design, product intent, requirements that live outside the repo, and whether a change should exist at all. The productive setup is AI first pass, human final call, with tools like Approvability reserving human attention for risky PRs.
How does AI code review understand my codebase?
It depends on the tool. Diff-only tools see the changed lines plus a little surrounding code. Codebase-aware tools index the repository first. Macroscope reads each change and explores the surrounding code in the repository so a review can follow a change to its callers, including files the PR did not touch.
How does AI code review find bugs that humans miss?
It reads every line of every PR with the same attention, including large PRs where human reviewers skim, and codebase-aware tools trace a change across files, which humans rarely do by hand. That catches contract breaks and edge cases that look fine inside the diff. No tool finds everything: in Macroscope's own benchmark, the top detection rate was 48.3% of 118 real bugs.
What is codebase-aware AI code review?
Codebase-aware AI code review analyzes a pull request against a model of the whole repository rather than the diff alone. The reviewer knows who calls a changed function, which types flow through it, and what depends on it, so it can flag breakage outside the changed files. Macroscope does this by exploring the surrounding code in your repository on every review. See how AI code review catches bugs across files.
How much does AI code review cost?
It depends on the pricing model. CodeRabbit is $24 per developer per month on Essentials billed annually, or $30 billed monthly. Greptile Pro is $30 per seat per month with 50 credits per seat. Macroscope is usage-based at $0.05 per KB of diff reviewed with a 10 KB minimum per review, no seat fees, and $100 in usage credit for every new workspace.
