AP35 · Unbounded agent loop

Family: Loop, stopping and orchestration

Strong evidence

Original names: unbounded agentic loop, no stopping condition, unbounded consumption

Nothing in the code stops the agent: no turn cap, no budget, no deadline.

Definition

The loop goes on for as long as the model or a tool result decides: another retry, another tool call, another conversation turn, another handoff. The only safeguard is a billing alert, seen after the fact.

Observable symptoms

  • Identical actions, with the same arguments, repeat in the traces.
  • Two agents keep passing the turn back and forth with almost identical messages.
  • Cost per task has a long tail: a few sessions cost dozens of times the median.
  • No trace ever reports a budget being reached: the overrun shows up on the bill.

Why it hurts

A model is a poor judge of its own deadlock. An error sent back without a counter reproduces the same error, and every turn rereads the whole context: cost grows faster than the number of turns. Between two agents, neither one owns the stopping condition.

A defensible choice when…

  • A short exploration, watched live, with no side effects and no shared budget.

Figures

  • Of 68 confirmed infinite loops in 47 open-source agent projects, none had a bound enforced by code (July 2026 preprint).
  • Across 1,642 traces of multi-agent systems, repeated steps account for 15.7% of failures and ignored stopping conditions for 12.4%.
  • Early versions of Anthropic’s research system spawned up to 50 sub-agents for simple questions and searched endlessly for sources that did not exist.

Remedies from the catalogue

Measures outside the catalogue

  • A retry counter per error type.
  • Alerts on hourly rather than monthly spend.

Misused patterns

Related anti-patterns

Sources

Content reviewed on 2026-10-05

Anti-pattern catalogue