---
title: "Break an AI loop by comparing five refactors | Ian Nuttall"
description: "Break an AI loop by comparing five refactors."
canonical: "https://ian.is/post/agent-refactor-options"
language: "en"
---

# Break an AI loop by comparing five refactors

Oct 2025 / 64,972 views / [via X](https://x.com/iannuttall/status/1976600241085567198)

this is the best way to break out of an "ai loop"

when the agent can't fix an issue and you go round in circles, ask it:

\- to think of 5 refactors
\- evaluate the options
\- pick the most reliable option

this just worked first time after fighting gpt-5 and sonnet for 20 minutes!

![no, it is still not working. can you fully audit this, thinking of at least 5 possible refactors that could work and be as simple and concise as possible. evaluate the options and then pick the simplest and most reliable option to proceed.](https://ian.is/media/tweets/1976600241085567198/1976600241085567198/d0ef1fb9e8d49c7bb988c9b5e19470f1db2a845bc51cf8c1a2b7ce16ac9e13f5.jpg)

## Ian's List

Join 15k\+ subscribers
