How Do You Get a Code Review From Cursor Before You Commit?
Agent Review is a dedicated code review on your local changes. After a task, click Review then Find Issues, type /agent-review, or run it from the Source Control tab to compare all your local changes with your main branch. Choose Quick for small diffs, or Deep for complex or sensitive code.
/agent-review Or, to review by hand with @Branch attached: Review the changes on this branch. Look for bugs, missing error handling, and anything that doesn't match our patterns in @[reference file]. Also tell me what questions reviewers will have, and what context I should include in the PR description. Don't edit anything.
- Reviews local changes
- Quick for small diffs
- Deep for sensitive code
- Reviews on push
- Starts at Premium
- Ignores .cursor/rules
Try it now
- 1After a task finishes, click Review then Find Issues.
- 2Open the Source Control tab and run Agent Review to compare all local changes with your main branch.
- 3Read each finding and open the code. It worked if you can either fix a finding or explain why it's wrong. To run it automatically, go to **Cursor Settings > Git & PRs > Pull Requests** (from Cursor 3.11).
Use it when
Before each commit on anything non-trivial, and always after a long agent run. Use Deep for complex logic, security-sensitive code or large refactors. Use Quick for small diffs, formatting changes or a fast sanity check.
Skip it when
Don't treat a clean result as approval. Cursor's course says your merge standards should stay the same whether code was written by hand or by an agent, and that you need to understand the change. Also skip Deep on routine small diffs, since the docs rate it slow and high in cost.
Why it works
Rule of thumb, not a Cursor claim: an agent that just wrote code tends to be a poor judge of it. A review run looks at the diff using a prompt Cursor says it has structured for that job. Cursor's course warns that AI-generated code can compile, follow your patterns and pass your tests while still missing edge cases, having security issues or duplicating existing logic. Reviewing from the Source Control tab catches problems across your full set of changes rather than only the latest edit.
Example
Say Agent has added a discount code feature that passes all its tests. You run Deep from the Source Control tab because it touches pricing. It flags that a percentage discount could be applied twice when codes stack, which your tests never tried. You then ask Agent to write a failing test for stacked codes before fixing it, so the case stays covered.
Going further
Agent Review reads the same BUGBOT.md rule files as Bugbot, Cursor's pull request reviewer. Create .cursor/BUGBOT.md with your repo's review rules, and nested files apply when reviewing nearby code. Bugbot itself reviews on push and, on The X Subscription, starts at Premium. Each of its rules is truncated at 30,000 characters. Separately, there's a built-in /review skill that picks the appropriate review agent, plus /review-security. One conflict to note: the Agent Review page says automatic mode runs "after every agent task" in one place and "after every commit" in another, so check what yours does.
Common mistakes
- Reviewing only the latest edit, and missing problems that span the whole branch.
- Using Deep for everything and burning through your usage.
- Having the same agent "fix everything it found" without reading the findings, which can add unrelated changes.
- Keeping review rules in
.cursor/rulesand expecting Bugbot to use them. Cursor's help says rules don't apply to Bugbot PR reviews, which useBUGBOT.md.
Sources
- Agent Review, Cursor Docs
- Reviewing and testing code, Cursor Learn
- Bugbot, Cursor Docs
- Agent Skills, Cursor Docs
- Models & Pricing, Cursor Docs
Checked 6 November 2026. Products change often, so confirm details with the vendor.