Here's a counterintuitive finding: repeatedly refining AI-generated code through multiple iterations can increase security vulnerabilities.
Why? Each iteration can introduce new bugs while fixing old ones. The AI loses track of the full picture as context grows.
The lesson: human review between iterations is not optional. Don't let the AI iterate endlessly without verification.