Sometimes AI code needs a full rewrite instead of more iterations. Consider rewriting when:
- Multiple bugs keep appearing in the same area
- Performance can't be optimized incrementally
- The architecture doesn't fit new requirements
- You don't understand what the code does anymore
Iteration is faster short-term. Rewriting is faster long-term when iteration compounds technical debt.