# The review loop

One turn from start to finish, covering what LeoPrevent reviews, when it steps in and how the fix is checked.

Every time your coding agent finishes a turn, LeoPrevent reviews what it changed. If the change is clean, the turn ends and LeoPrevent says nothing, apart from one line the first time a clean review runs on a machine. If there is an issue in the change or the code around it, the agent gets the reason and the safe fix, makes the change, and LeoPrevent checks the fix again.

## What happens in a turn

**You send a prompt**

The plugin notes where your files stand. Nothing leaves your machine at this point.

**The agent works**

The agent writes as it normally would. LeoPrevent does not interrupt it or block a write.

**The agent finishes**

The plugin sends the changed files and the code they call for review, however they were changed, including by shell commands and formatters.

**LeoPrevent reviews the change**

It reviews the code the agent changed. If you have connected Aikido, Snyk, Sonar, Veracode, GitHub code scanning or GitHub issues, it also judges their open findings in the same files.

**If there is an issue, the agent gets the advice**

For each flaw, the agent gets where it is, the reason and the safe fix. It fixes new flaws before the turn ends, and existing flaws in the code it is working on when that is safe, saying why it left any. See [New and existing flaws](https://help.leotrace.io/new-and-existing-flaws/).

Scanner findings go to the agent the same way. Real ones are handled like existing flaws: fixed where that is safe. Likely false positives are confirmed with the agent and listed in **Security tools** for you to ignore at source. See [Security tools](https://help.leotrace.io/security-tools/).

**LeoPrevent checks the fix**

When the agent has acted on the advice and stops again, LeoPrevent reviews the change again. If a new flaw is still there, you get a warning before you ship the code. See [Checking the fix](https://help.leotrace.io/checking-the-fix/).

## Where you see the result

- **In the agent:** in the Claude Code terminal, a LeoPrevent line when the agent gets advice; in the Claude desktop app and Claude Code on the web, a short LeoPrevent summary at the start of the agent's reply.
- **On the dashboard:** every flaw and what the agent did with the advice, in **Findings**.

## What stays with you and your agent

- The agent makes every change. LeoPrevent never edits your code.
- A turn LeoPrevent could not review ends normally. See [When a review can't run](https://help.leotrace.io/when-a-review-cant-run/).

Each agent shows the advice in its own way. See [How each agent handles a finding](https://help.leotrace.io/how-agents-handle-findings/).

Source: https://help.leotrace.io/how-leoprevent-works/ (updated 2026-11-19)
