New and existing flaws

How LeoPrevent tells new flaws from existing ones, and why it advises the agent to fix both in the code it is working on.

Every flaw LeoPrevent finds is either new or existing. It advises the agent to fix both: new flaws before the turn ends, existing flaws in the code the agent is already working on.

New flaws#

A new flaw is on a line the agent added in this turn, or comes from a protection the agent removed in this turn. LeoPrevent gives the agent the reason and the safe fix, and the agent fixes it before the turn ends.

Existing flaws#

An existing flaw was already in the code before the turn started. LeoPrevent advises the agent to fix it as part of the same change, when it sits in code the agent is already working on and the fix is safe.

If a fix would reach beyond the change, or cannot be made safely, the agent leaves the flaw and says why. It stays on the dashboard for you to decide: fix it, file an issue, or leave it.

Why the split matters#

An existing flaw is fixed only where that is safe, so the change stays focused on the task you gave the agent.

The two are counted separately. On the Overview, new flaws fixed on LeoPrevent's advice count towards Flaws prevented, and existing flaws fixed count towards Existing flaws fixed.

Updated 19 Nov 2026

Suggested articles