# Agent Review

Let an agent read your changes, show each issue under its lines, and fix it in the chat or dismiss it.

Agent Review reads the changes of your project and points out what looks wrong, such as a bug, a security hole or slow code. Each issue shows under the lines it is about, and you decide what happens to it.

The changes page with the Compare with picker and the Agent Review toolbar at the top, an issue card under its lines with Fix in chat, Dismiss and the Helpful and Not helpful buttons, and the count of open issues beside the file in the file list.

## What you can do

- Start a review from the changes page, from Source Control or from the chat.
- Pick a **Quick** review of the changed lines, or a **Deep** review that also follows what they touch.
- Choose what the review compares with, such as **Since main** or **Since last review**.
- Read each issue under its lines, with how serious it is and what kind of issue it is.
- See every issue in the **Issues** list beside the files, filter it by severity and go straight to one.
- Go from issue to issue with `F7` and `Shift + F7`.
- Send an issue to Lyna AI with **Fix in chat**, or every open issue at once with **Fix all**.
- Follow each issue you send: it reads **Fixing in chat** while Lyna AI works on it, then **Fixed in chat**.
- **Dismiss** an issue with a reason, or **Reopen** it.
- Tell Lyna whether an issue was **Helpful** or **Not helpful**.
- Follow the review from a card in the chat, with **Stop** and **Run again**, and close the card once the review ends.
- Leave notes for your team on the changed lines, beside the issues.

## Start a review

A review reads a page of changes that has a base: the changes since main, committed or not. You can start one in three places.

### Changes page

In **Code** mode, open **Source Control** and choose **Review changes since main** at the top, or run **Review Changes Since Main** from the command palette. The page opens on every change since main. Choose **Find issues** in the toolbar under the page title.

### Source Control

Choose **Run Agent Review** at the top of **Source Control**. It opens the changes since main and starts a Quick review over them in one step.

### Chat

Type `/agent-review` in the message box and send it for a Quick review, or `/agent-review deep` for a Deep one. The review reads the changes since main, and its card shows above the message box.

A review needs a model. If none is chosen in the chat, Lyna shows **Select a model to run this** with **Choose a model**, and nothing starts. Only one review runs on a branch at a time.

## Quick or Deep

**Find issues** runs a Quick review. Open the arrow beside it (**Review options**) to pick the depth:

The Find issues menu open, with Quick, which reads the changed lines, and Deep, which follows callers and types and takes longer.

| Depth     | What it reads                                                                                            |
| --------- | -------------------------------------------------------------------------------------------------------- |
| **Quick** | The changed lines.                                                                                       |
| **Deep**  | The changed lines, then the code that calls them and the types they use. It takes longer and costs more. |

While a review runs, the toolbar reads **Reviewing**, with **Stop**.

## Choose what the review compares with

The **Compare with** picker at the start of the toolbar sets the base of the page, and the review reads the changes from that base:

- **Since main**: on a branch, everything since the branch left main. On main, the picker names the base it found instead, such as **Since origin/main**, **Since this conversation began** or **Since the previous commit**.
- **Since last review**: only what changed since the last review. The picker offers it when you open the page from the review card in the chat.
- **Uncommitted only**: the changes you have not committed. A review needs a base, so **Find issues** waits and says **Compare with main or the last review to find issues**.

## Read the issues

When the review ends, the toolbar shows how many issues it found, or **No issues found**.

- Each issue is a card under the lines it is about, beside the notes of your team. The card shows how serious the issue is (**Must fix**, **Should fix** or **Note**), its title, its kind (**Bug**, **Security**, **Performance**, **Correctness**, **Style**, **Maintainability** or **Other**) and the reviewer's explanation.
- A file named in the explanation is a link that opens the file at that line.
- In the file list, each file shows its number of open issues, in the color of the most serious one.
- The review writes in the language of your app.

Press `F7` for the next issue and `Shift + F7` for the previous one, or use **Next issue** and **Previous issue** in the toolbar. The toolbar shows **Issue 2 of 5**, the page scrolls to the issue and its card takes the focus. Press `Escape` on a card to go back where you came from: the toolbar, or the row of the **Issues** list.

## Find an issue in the list

At the top of the file list, switch from **Files** to **Issues** to see every issue of the review, or choose the issue count in the toolbar, such as **3 issues**.

The changes page with the Issues list in the left column: the Files and Issues switch, the severity filter with its counts, the issues grouped by file with their lines, and the closed Resolved group at the end.

- The issues are grouped by file, in the order of the page. Each row shows how serious the issue is, its title, its kind and its lines, such as **L42** or **L42-48**.
- Choose a row, or press `Enter` on it, to go straight to the issue: the page scrolls to its lines and its card takes the focus.
- Filter the list with **All**, **Must fix**, **Should fix** or **Notes**. Each one counts the open issues.
- Fixed issues sit in **Resolved** and dismissed ones in **Dismissed**, at the end of the list. Open a group to see them, and choose **Reopen** on a dismissed issue to bring it back.
- Point at a row to send its issue to the chat with **Fix in chat**.
- The issue you are on stays selected and in view as you move with `F7` and `Shift + F7`.
- Move in the list with the arrow keys, `Home` and `End`. `Left` and `Right` close and open a file's group.

On a phone, the file list opens over the page from the button with the number of files. Choosing an issue closes it on that issue.

To hide the issues of this review, choose **Clear review**. On a narrow page, it sits in **More review actions**.

## Act on an issue

1. ### Fix it in the chat

   Choose **Fix in chat**. Lyna AI gets a Build message that names the file and the lines, with the reviewer's report attached, and the chat opens. Lyna AI checks the report against your code before it changes anything.
2. ### Or fix them all at once

   Choose **Fix all** in the toolbar. Lyna AI gets one Build message with the report of every open issue, the most serious first, and checks each one against your code before it changes anything. One message carries up to 12 reports, fewer when notes already wait in the message box: when there are more issues, the most serious go first, the message says how many of how many, and the others stay open. **Fix all** waits and says why when there is **No open issue to fix**, when **The chat is not available here**, or when the message box already holds as many notes as one message can carry.
3. ### Or dismiss it

   Choose **Dismiss** and pick a reason: **Not a bug**, **Won't fix**, **False positive** or **Other**. The card folds into one quiet line that reads **Dismissed** with the reason. The next review of the branch is told about it and does not report it again unless its code changes. Choose **Reopen** to bring it back.
4. ### Rate it

   Under **Was this helpful?**, choose **Helpful** or **Not helpful**. Each person rates an issue for themselves.

## Follow a fix

An issue you send with **Fix in chat** or **Fix all** follows the turn that fixes it.

An issue card under its lines that reads Fixed in chat, with a check mark, a muted title, one line of its explanation, and the Reopen and View in chat buttons.

- While Lyna AI works on it, the card reads **Fixing in chat**, with **View in chat** to open the message that carries its report. The issue still counts as open.
- When the turn ends and has changed the issue's file, the card reads **Fixed in chat**, with a check mark, a muted title and one line of the explanation. The issue leaves the issue counts, the file badges and the chat card, and moves to **Resolved** in the **Issues** list.
- When Lyna AI asks you something first, such as a setup question, the issue is marked fixed once the turn your answer starts changes its file.
- When you stop the turn, or it fails or ends without changing the file, the issue stays open. A dismissed issue keeps its decision.
- Choose **Reopen** on a fixed issue to open it again, or **View in chat** to see the message that fixed it.
- An issue fixed in a conversation the chat does not show reads **Fixed**, with **Reopen**.

## Follow the review in the chat

A review you start shows a card above the chat's message box. Its header names the depth and what the review compares with, and the row under it shows what the review found, with its one action at the right.

The Agent Review card above the chat's message box, with the Quick depth, the compared changes, the issues by severity and the Open in changes button.

- While it runs, the card reads **Reviewing** with **Reading the changes and what they touch**, and **Stop** ends the review.
- When it ends, the card shows the open issues by severity, such as **2 must fix** and **1 note**, or **No issues found** with **Nothing to fix in these changes**. The counts follow each fix at once. **Open in changes** opens the changes page in Code mode, on the **Issues** list, at the first open issue.
- When a review fails or you stop it, the card says why and offers **Run again**.
- Once the review has ended, **Close** at the right of the card's header takes the card away until your next review. A running review has no **Close**: it keeps **Stop**.

| The card says                               | What to do                                               |
| ------------------------------------------- | -------------------------------------------------------- |
| The project's machine could not be reached. | Open the preview, then run the review again.             |
| No credits are left for this model.         | Upgrade your plan, or choose a model on your own key.    |
| The model's provider refused the review.    | Check its connection in **Settings**, then run it again. |
| The review took too long and was stopped.   | Try a Quick review.                                      |
| Too many reviews in a short time.           | Wait the time the card shows, then try again.            |

## Notes from your team

The changes page also shows the notes your team leaves on code. Point at a line of the new code and choose the **+** beside it (**Add a note**) to write one, mention a teammate or an agent with `@`, and choose **Comment** or **Send to AI**. The diff of one file shows the same notes.

- On a line that holds both, the issue cards come first, then the notes.
- A note is not part of a review: it stays when you choose **Clear review** or run a new review, and it follows the code as it changes.
- The notes of a file also show between its lines in the code editor, and **Comments** in the views rail lists them all by file.

See [Annotate](/features/collaborate/annotate#notes-on-code).

## Review a pull request

A pull request on GitHub has its own review page, with every changed file, line comments, and **Comment**, **Approve** or **Request Changes**. See [Review a pull request](/features/code/github-and-pull-requests#review-a-pull-request).

## What a review costs

A review runs on the model selected in the chat, on your project's machine, and it counts like a chat turn on that model:

- On a Lyna model, it uses your credits like a message: those of the last 24 hours and of the month on Free, those of the month on Pro.
- On a connected provider, it uses your own subscription or API key, with no Lyna credits.

A Deep review takes more steps and a higher effort, so it uses more. A review that stops before its first step costs nothing. See [Credits per turn](/features/ai/credits-per-turn).

> [!NOTE]
>
> **A review never changes your code**
>
> The reviewer only reads your project. Your code changes only when you choose **Fix in chat** or **Fix all** and Lyna AI makes the fix in a Build turn.

## Who can do what

Anyone who can open the project sees the issues and can rate them. Starting a review, dismissing an issue and reopening it need edit access to the project. A chat turn marks issues fixed only when the person who sent it can edit the project.

## Shortcuts

| Action                                      | Shortcut     |
| ------------------------------------------- | ------------ |
| Next issue                                  | `F7`         |
| Previous issue                              | `Shift + F7` |
| Back to the toolbar or the list from a card | `Escape`     |
| Go to the issue of a row in the Issues list | `Enter`      |

## Related

- [Git](/features/code/git): Review your changes, commit them and work with branches.
- [Slash commands](/features/ai/slash-commands): Start actions such as /agent-review from the message box.
- [Credits per turn](/features/ai/credits-per-turn): How AI turns are counted on each plan.
- [Annotate](/features/collaborate/annotate): Leave notes on code and on your page for your team or the AI.
