LearnAI home

When It Breaks ยท Lesson 3

When an AI Loop Goes Wrong

Going round forever, getting stuck, and quietly drifting away from what you asked.

The same mechanism, failing

Everything that makes a loop useful is also what makes it fail. It keeps going, so it can keep going too long. It reacts to results, so it can react badly. It adapts the plan, so the plan can end up somewhere you never asked for.

There are three shapes this takes. Two of them announce themselves. The third does not, and that is the one to learn properly.

In plain English

Runaway loop:
A loop with no working stopping condition, so it keeps taking passes long after it should have finished.
Stuck loop:
A loop that repeats the same failed move over and over instead of trying a different one.
Drift:
The finished work gradually coming to answer a different question than the one you asked.
Plausible output:
Work that looks finished and well made, whether or not it is actually right.

Failure one: it goes round forever

The most obvious failure. Nothing tells the loop it is done, so it does not stop. You watch step forty-one arrive, then forty-two, and the work is no longer visibly improving.

This usually happens when the finish line was described in a way that can never quite be satisfied. Make it really good. Make sure everything is correct. Keep improving the summary. None of those has a state where the answer is clearly yes, so the loop keeps looking for one.

It is annoying rather than dangerous, mostly because you can see it. The counter goes up, the clock runs, and you notice.

Failure one: no finish line

BRIEF Improve this summary until it is really good.

PASS 12 Reworded the opening for clarity. PASS 13 Reverted the opening, the previous version was clearer. PASS 14 Reworded the opening for clarity. PASS 15 Tightened paragraph two. PASS 16 Loosened paragraph two, it had become terse. PASS 17 ...

Nothing here is wrong. Nothing here is finished either, because "really good" has no moment where the answer is yes.

Failure two: it gets stuck on one move

Different shape, same visibility. The loop finds an approach that does not work, and instead of trying something else, it tries the same thing again with slight variations.

You will recognise this from real life. Someone whose printer will not respond, pressing print for the ninth time. The move is not working, and the response to it not working is to do it once more, slightly harder.

An AI loop does this when its check step reports failure but does not carry enough information about why. It knows the last attempt did not succeed. It does not know that the reason will apply equally to every variation of that attempt.

Failure two: the same move, again

GOAL Pull last month's figures from the reporting system.

PASS 3 Try the export link. Access denied. PASS 4 Try the export link again. Access denied. PASS 5 Try the export link with a different date range. Access denied. PASS 6 Try the export link once more. Access denied.

The blocker is a permission, and no variation of that link will ever get past it. The loop has no way to know that, so it keeps knocking on the same locked door.

Both of these failures have the same tell: passes are happening but nothing new is being learned. If you look at three consecutive steps and cannot say what any of them found out, the loop is spinning rather than working.

Failure three: drift

Now the dangerous one.

You asked for a summary of customer complaints from the last quarter, focused on the delivery problems. The loop opens the complaints, notices that many mention the mobile app, decides that the app is the real story, gathers more on that, structures the report around it, and hands you an articulate, well organised, genuinely interesting report about the mobile app.

Nothing failed. No error appeared. Every individual step was a reasonable response to what the previous step found. Follow the chain and each link makes sense. It is only when you hold the finished work next to your original request that you see they are about different things.

Drift is dangerous for exactly the reason the other two are not: the output is polished. A runaway loop looks broken and a stuck loop looks broken. Drifted work looks like the best thing you got all week. It has a clear structure, confident conclusions and no sign of struggle, and that finish is precisely what stops you checking it against the brief.

Failure three: every step reasonable, the destination wrong

YOU ASKED Summarise last quarter's complaints about delivery delays.

PASS 2 Opened the complaints. Many also mention the mobile app. PASS 5 The app issues look more frequent than the delivery ones. PASS 8 Gathered app-related complaints in more detail. PASS 14 Structured the report around app usability themes. PASS 20 Polished. Added recommendations. Finished.

DELIVERED A confident, well written report about the mobile app.

No step was unreasonable. The brief said delivery delays.

Judge the finished work against what you originally asked for, not against how good it looks. A polished answer to the wrong question is worse than a rough answer to the right one, because you are far more likely to act on it.

How to tell them apart quickly

The runaway loop has passes with no progress. The stuck loop has the same move repeating. Drift has steady, sensible progress in a direction you did not choose.

That last one is why the habit worth building is not watching the steps but re-reading your own request before you read the answer. Your brief is the only thing in the room that has not moved.

Checkpoint

Loops fail three ways: running forever without a finish line, repeating one failed move, and drifting so the finished work answers a different question. Drift is worst because the output still looks polished.

Quick Quiz

๐Ÿ“ Quiz

Question 1 of 4

What usually causes a loop to run forever?

Found this useful? Pass it on.