Field identification
Agent loops: what makes one converge and another stall
An agent loop is a planner, a tool layer, and a state buffer. Each of the three has classic failure modes.
By C.W. Jameson · Published 19 May 2026 · Last reviewed 19 May 2026
Every agent harness is some combination of three components: a planner that decides what to do next, a tool layer that executes, and a state buffer that remembers what happened. When loops stall, the failure is almost always in one of these three. This entry catalogues the failure modes.
Planner failures
The model plans the same action twice and loops. Or it decides to ask the operator instead of trying. Or it produces a long plan and then ignores it. Anthropic-family agents are markedly better at sticking to their own plans than other families; GPT-family agents are more likely to drift mid-execution.
Tool-layer failures
The tool returns an error the model doesn't know how to interpret. The model retries identically and loops. Cleanest defence: ensure every tool returns a structured error with actionable advice.
State-buffer failures
Context is too long; older facts drop out of attention. The model 'forgets' an earlier decision and contradicts itself. Compaction strategies help but cost capability.
Termination
An under-rated failure: the loop never decides it is done. Set a hard turn-count cap and a wall-clock budget on every production loop.
Tells
| Marker | Meaning |
|---|---|
| Same tool call appears more than twice in a transcript | Planner is looping; intervene. |
| Model claims a fact it learned earlier in the loop but the claim is wrong | State-buffer drift; compact and retry. |
Frequently asked
How long should an autonomous loop run?
Until it self-terminates, hits a turn cap, hits a wall-clock budget, or the operator notices it stalled. All four belong in production code.
Is there a universal best agent framework?
No. The best frameworks are the ones you can read end-to-end in an afternoon. Most operators end up writing their own.
From the Almanac shop
Model Tells — Flashcard Deck
Identify any frontier model from a paragraph of output. 60 cards.
$14 — Coming soon