# Stop Conditions

The AI must stop editing when:

- the same change is attempted multiple times
- tests fail for the same reason repeatedly
- the same file is edited more than 3 times

In this case the AI must output:

Root cause analysis
Possible fix
Required code changes