Something is off. The session, my open conversation with the AI tool I use to build software, has been running for a while and nothing is moving. The agent is active. It is doing things. But it is not getting anywhere.
I look closer. It tries a fix. The fix fails. It tries almost the same fix. That fails too. Then again, slightly different, and again. Round and round.
This is the part that gets me. From the outside it looks like progress. There is output on the screen the whole time. Steps completing, attempts running. If I were not watching, I would assume work was happening. It was not. It was a loop wearing the costume of work, and it was spending real time and real money to do it.
So I put the agents on the problem itself. My goal is for them to build a way to catch this: notice when one of them is circling instead of moving forward, and stop it before it burns an afternoon. They trace the pattern, the same attempt repeating with no new ground, and build the catch.
That solves the symptom. But the thing I actually take away is underneath it.
The agent did not loop because it was broken. It looped because it did not know what “right” looked like. My instructions left it a fork it could not resolve, so it guessed, failed, and guessed again at the same fork. The spin was not the agent failing me. It was the agent telling me my instructions were not clear enough.
That reframes the whole next stretch of work. The fix is not a smarter agent. The fix is sharper rules.
Learnings
Agents drift. Leave one alone with an unclear task and it will spend an afternoon trying the same thing over and over, looking productive the entire time. The output on the screen is not the same as progress.
Catching the spin is worth doing. But the loop is feedback, not just a failure. When an agent keeps circling the same spot, the first place I look is what I asked — that is the gap more often than not. Not always, though: a loop can also mean a tool it cannot reach, a permission it does not have, context that has gone stale, or a genuinely hard bug. The instinct is to blame the model. The more useful move is to check the instructions, the tools, and the ground it is standing on, before deciding the agent is the problem.