Beta Coming soon. This feature is still being built, so names and details may change before it ships.

Agent review before commit

Agent review, right above your commit message, reviews your changes in the mode you pick, finds issues, and lets you fix each finding inline before you commit.

It sits in the Source Control view and at the end of every agent run in the chat. Each finding comes with its file and line, a severity, whether it blocks the commit, and a suggested fix you can apply in one click.

The review row

By default Agent review is one row above the commit message, in Local Changes, the Commit window and under an agent run's edits in the chat:

Local Changes with the review row above the commit message: Review with the Default mode chip, the Find issues bug icon, and Reviewed 2 files · 3 issues with the severity counts

PartWhat it does
✦ ReviewReviews the changes in the selected mode.
Default ▾The mode chip. Click it, or run Agent Review: Choose Review Mode (⌘⌥⇧., Ctrl+Alt+Shift+.), to pick Default, My rules, Industry rules or Both.
Bug iconFind issues, the deeper bug hunt.
Last resultOne line such as Reviewed 3 files · 1 issue with the severity counts. Click it to open the findings in the diff viewer, with Apply and Dismiss under each line.
×Clears the result.

A blocked commit shows Commit blocked by Agent review · Commit anyway in the same row. The explanations moved to the tooltips, and the editor still shows each finding inline with its quick fixes.

To get the full block below instead, with the file list and every finding inline, turn off the compact row in Settings › Tools › Agent review before commit or Settings › Features › Compact Agent review row (ingot.review.compactPanel).

The Agent review block

With the compact row turned off, one block holds everything:

The Agent review block under Local Changes: the Review split button, Find issues, the changed files and the findingsThe Agent review block under Local Changes: the Review split button, Find issues, the changed files and the findings
The Agent review block under Local Changes: the Review split button, Find issues, the changed files and the findings
PartWhat it does
Review ▾Reviews the changes in the selected mode. The arrow opens the mode menu.
Find issuesA deeper bug hunt that also reads the whole changed files.
Changed filesThe files the review covers, with a count of open findings. Double-click a file to open the diff viewer.
Status linesWhat was reviewed, in which mode and with which model, for example Review · Default: Staged changes (1 file) · 2 findings to look at · Ingot Fast.
FindingsEach finding with Apply, Fix with agent and Dismiss.

The block shows up in two places:

  • Source Control: in the Local Changes tool window (⌘K, Ctrl+K) and in the Commit window, under the changed files. It reviews what you are about to commit.
  • Chat: at the end of each agent run's edits summary, under Edited N files. It reviews only that run's edits.

In Source Control the block shows only once Git works in the folder. In a folder without a repository, Local Changes and the Commit window show Initialize Repository instead. See Folders without Git.

The Agent review block under the changed files in Local Changes, before a reviewThe Agent review block under the changed files in Local Changes, before a review
The Agent review block under the changed files in Local Changes, before a review
The Agent review block under an agent run's Edited 1 file summary in the chatThe Agent review block under an agent run's Edited 1 file summary in the chat
The Agent review block under an agent run's Edited 1 file summary in the chat

Review modes

Click the arrow next to Review to choose what it checks. Default is selected at first, and your last choice is remembered.

ModeWhat Review checks
DefaultBugs and risky changes: crashes, security holes, data loss, race conditions, wrong logic, missing error handling.
My rulesYour project rules that apply to the changed files: .ingot/rules, .cursor/rules and AGENTS.md, nested ones included. Each violation is tagged with its rule, such as Rule: engineering.mdc. Serious bugs are still reported.
Industry rulesBuilt-in checklists: Security, Performance, Accessibility (only when a UI file changed, such as .tsx, .html or .css) and Best practice. Each violation is tagged with its checklist.
BothYour project rules plus the industry checklists.

The button shows the current mode (Review · Default), and the status line shows how many project rules were used. The choice is saved in ingot.agentReview.mode, in your user settings, or in the project settings when the project already sets it.

The Review mode menu: Default, My rules, Industry rules and Both, with Default checkedThe Review mode menu: Default, My rules, Industry rules and Both, with Default checked
The Review mode menu: Default, My rules, Industry rules and Both, with Default checked

Find issues

Find issues goes deeper than Review. It hunts for concrete bugs the change introduces or exposes and gives the model the full current text of every changed file, so it can check callers, invariants, error paths, edge cases (empty, null, zero, large input), off-by-one errors, async races and resource leaks.

Its findings carry a Find issues tag and the category Bug, and they join Review's findings in the same list, in the editor and in the diff viewer. They count toward the commit block like any other finding. Run it from the block, from the diff viewer, or with Agent Review: Find Issues (⌘⌥⇧/, Ctrl+Alt+Shift+/).

A Find issues finding in the Agent review block, tagged Find issues and Bug, next to the Review findingsA Find issues finding in the Agent review block, tagged Find issues and Bug, next to the Review findings
A Find issues finding in the Agent review block, tagged Find issues and Bug, next to the Review findings

Review what you are about to commit

In Source Control, Review and Find issues cover:

What is stagedWhat is reviewed
Some files are checked (staged)Only the staged files
Nothing is checkedAll changes, new files included

You can also run Git: Agent Review Before Commit (⌘⌥⇧Enter, Ctrl+Alt+Shift+Enter) or find it with Find Action.

The review uses the same engine as AI code review. It looks only at added and changed lines and reports real problems.

Review an agent run's edits

In the chat, the block under an agent run reviews only the files that run edited, compared with how they were before the run, even before you accept the edits. The status line says Agent edits (2 files). Apply, Dismiss and the diff viewer work the same way as in Source Control.

Findings and fixes

Each finding shows:

  • its severity (Critical, High, Medium or Low)
  • whether it Blocks commit or is only a Warning (see Block or warn)
  • its category, such as Security or Rule: engineering.mdc, and a Find issues tag when Find issues found it
  • its place, src/math.ts:2, which opens the file at that line
  • a title and why it is a problem
  • the suggested fix as a small diff, when the model has a safe one

Under each finding:

ActionWhat it does
ApplyWrites the fix into the file and saves it. Undo works as usual (⌘Z, Ctrl+Z).
Fix with agentStarts a chat that fixes the finding with a minimal change.
DismissHides the finding.

Apply finds the code by its text, not by line number. If the code changed since the review, nothing is written and you see: The code changed since the review, so this fix no longer matches. Run Agent review again.

Diff viewer

Double-click a file in the block (or press Enter on it) to open a large diff viewer, like the commit dialog of a desktop IDE:

  • Side-by-side or Unified, switched in the header
  • Previous and Next change (↑ ↓, or Shift+F7 and F7). Past the last change of a file it moves on to the next file, and the header counts Change 1 of 2.
  • the changed files on the side: click one to jump to it
  • Review (with the mode menu) and Find issues in the header

While the viewer is open, findings from Review and Find issues appear right under their lines with Apply and Dismiss, and they update live as you review again, apply or dismiss. Esc closes the viewer and returns focus to where you were.

The diff viewer side by side: the file list, Change 1 of 2, and findings under their lines with Apply and DismissThe diff viewer side by side: the file list, Change 1 of 2, and findings under their lines with Apply and Dismiss
The diff viewer side by side: the file list, Change 1 of 2, and findings under their lines with Apply and Dismiss
The diff viewer in unified mode with the same inline findingsThe diff viewer in unified mode with the same inline findings
The diff viewer in unified mode with the same inline findings

In the editor

Findings show up in the editor and in diff editors too:

  • a gutter icon and a tinted line, red when the finding blocks the commit and amber when it only warns
  • a short hint at the end of the line, such as Blocks commit · High: sub subtracts in the wrong order
  • a hover with the explanation, the category and the suggested fix
  • an entry in Problems with the source Ingot Agent Review
  • context actions (⌥Enter, Alt+Enter): Apply fix: … and Fix with agent: …
Agent review findings on the changed lines: a red blocking finding and an amber warning with inline hintsAgent review findings on the changed lines: a red blocking finding and an amber warning with inline hints
Agent review findings on the changed lines: a red blocking finding and an amber warning with inline hints

Block or warn on high-severity findings

Critical and High findings are high-severity. What they do depends on ingot.review.highSeverity:

ValueWhat happens when you commit
block (default)The finding says Blocks commit, and the commit stops with Commit blocked by Agent review: 1 high-severity finding. Apply or dismiss it, or Commit anyway.
warnEvery finding says Warning. The commit goes ahead, with a notification that lists the findings.

Commit anyway commits right away. Applying or dismissing the last high-severity finding lifts the block. Medium and Low findings never stop a commit.

A commit blocked by Agent review, with Commit anywayA commit blocked by Agent review, with Commit anyway
A commit blocked by Agent review, with Commit anyway

Review on click or before every commit

ingot.review.beforeCommit decides when a review runs:

ValueBehavior
offNo Agent review block and no review.
onClick (default)Reviews when you click Review or Find issues. A blocking finding stops the commit until you apply, dismiss or override it.
autoAlso reviews before every Commit and Commit and Push, in the selected mode. If the changes are the same as at the last review, it does not run again.

In auto mode, if the review cannot run (for example the model is offline), the commit goes ahead with a warning: Agent review did not run (…). Committing without it.

Keyboard shortcuts

Every action is also in Find Action (⌘⇧A, Ctrl+Shift+A).

ActionmacOSWindows and Linux
Agent Review Before Commit⌘⌥⇧EnterCtrl+Alt+Shift+Enter
Agent Review: Find Issues⌘⌥⇧/Ctrl+Alt+Shift+/
Agent Review: Choose Review Mode⌘⌥⇧.Ctrl+Alt+Shift+.
Agent Review: Open Changes in Diff Viewer⌘⌥⇧,Ctrl+Alt+Shift+,
Next / previous change in the diff viewerF7 / ⇧F7F7 / Shift+F7

Settings

Open Settings › Tools › Agent review before commit, or set the keys in your user settings or the project's .ingot/settings.json:

SettingDefaultWhat it does
ingot.review.beforeCommitonClickoff, onClick or auto
ingot.review.compactPaneltruetrue shows Agent review as one row; false shows the full block
ingot.agentReview.modedefaultdefault, rules, industry or both. The Review menu writes it.
ingot.review.highSeverityblockblock or warn
ingot.review.modelemptyModel for the review. Empty uses the review model from ingot.agent.reviewModel, then a cheap connected model such as Ingot Fast.
ingot.review.rules[]Review rules, one per line: rule text, or a file such as @docs/review.md
ingot.review.ignore[]Globs of paths to leave out, one per line, such as dist/**
{
  "ingot.review.beforeCommit": "auto",
  "ingot.agentReview.mode": "both",
  "ingot.review.highSeverity": "block",
  "ingot.review.rules": ["Money is always integer cents.", "@docs/review-guidelines.md"],
  "ingot.review.ignore": ["dist/**", "**/*.lock", "src/generated/**"]
}
Settings › Tools › Agent review before commitSettings › Tools › Agent review before commit
Settings › Tools › Agent review before commit

Review rules

Every review, in any mode, also follows these, in this order:

  1. Your team rules and BUGBOT.md files, as in AI code review.
  2. Each entry of ingot.review.rules. An entry that is a single .md, .mdc or .txt path (@docs/review.md, ./review.txt) is read from the project; anything else is used as the rule text.
  3. Every .md, .mdc and .txt file in .ingot/review/ (up to 40). Frontmatter is dropped, so .mdc rules work as is.

A file in .ingot/review/ that a BUGBOT.md already links to is not added twice. As with Bugbot, each rule is cut at 30,000 characters and all rules of one review add up to at most 100,000. The My rules mode adds your project rules within the same limits.

Ignored paths

Files that match ingot.review.ignore are never sent to the model. They still get committed. The status line counts them: 1 file ignored.

Budget

A review stays fast and inexpensive: at most 3 model calls of 24,000 characters of diff each, and up to 40 findings. Find issues also sends the changed files' text, up to 12,000 characters per file and 24,000 per call. Files that don't fit are listed in the status line as over the review budget.

From the terminal

The ingot CLI runs the same review, so you can use it in a git hook or in CI:

ingot review                    # staged changes, else all changes
ingot review --mode both        # project rules and industry checklists
ingot review --find-issues      # deeper bug hunt with the whole changed files
ingot review --all --json       # everything, as JSON
ingot review --apply            # write the suggested fixes into the files
ingot review --fail-on medium   # fail on medium findings too

It reads ingot.review.rules, ingot.review.ignore, ingot.review.highSeverity and ingot.agentReview.mode from .ingot/settings.json, the rules in .ingot/review/ and your BUGBOT.md files. It exits 1 when a high-severity finding blocks the commit, so a pre-commit hook is one line:

# .git/hooks/pre-commit
ingot review --staged
OptionWhat it does
--staged, --allReview only the staged changes, or every change
--mode <mode>default, rules, industry or both (default: ingot.agentReview.mode, else default)
--find-issuesThe Find issues bug hunt instead of a review in a mode
--model <id>OpenRouter model (default google/gemini-2.5-flash-lite)
--max-cost <usd>Hard cost cap for the whole review (default $0.05, at most $1). A call that could cross it is not made and the run exits 3.
--rule, --ignoreExtra rules and ignore globs; repeat them for more
--warn, --fail-on <severity>Report without failing, or fail from a given severity
--applyWrite the suggested fixes (they are not staged)
--mockA free, deterministic reviewer for testing pipelines

The OpenRouter key comes from OPENROUTER_API_KEY or ai.openrouterApiKey in the project's gitignored ingot.config.json. See the CLI reference.

To review a whole branch or a GitHub pull request instead of the next commit, use AI code review.