An agent with no stop condition will happily run forever

Build explicit termination and progress checks, so an agent that stops making headway stops, and a stuck run ends in seconds. Leave them out and the agent loops, repeats, and burns budget chasing a goal it cannot reach.

B

Balagei G Nagarajan

3 MIN READ


An agent looping endlessly without a stop condition, burning budget
Termination conditions put a hard ceiling on steps and time.
— from “An agent with no stop condition will happily run forever”

Key facts.

  • AgentBench shows models are far from reliable across multi-step decision-making environments, including failing to make real progress on tasks. source
  • Crescendo shows agents can be driven step after step in multi-turn interactions without an internal stopping check, the same lack of self-limiting that lets a loop run on. source

Why do agents loop?

An agent works by deciding a next action, taking it, observing and deciding again. Nothing in that cycle inherently knows when to stop. If the goal is unreachable, the tool keeps returning the same unhelpful result or the agent misreads its own progress, it will keep deciding next actions, repeating steps or oscillating between two, indefinitely. AgentBench's finding that agents are unreliable at multi-step decision-making includes exactly this failure to recognize a lack of progress. And the absence of a self-imposed stop is structural, not incidental, which is why Crescendo can walk an agent step by step toward a goal it should have refused; there was no internal check saying "this is going nowhere good, stop."

Because the agent will not reliably stop itself, the system has to. Termination conditions put a hard ceiling on steps and time. Progress checks detect when the agent is not advancing, by repeated states, no change in distance to the goal or oscillation and halt or escalate when headway stalls. A loop-detection mechanism catches the agent revisiting the same state. None of these are sophisticated; they are the equivalent of a maximum-iterations guard around a while-loop, which every careful programmer writes by reflex. The mistake is assuming the agent's intelligence makes the guard unnecessary. It does not, because the agent's intelligence is exactly what does not reliably include knowing when it is stuck.

An agent loop with explicit termination and progress-check exits

What stops a runaway loop?

GuardWithout itWith it
Step/time ceilingRuns foreverHard stop at the limit
Progress checkGrinds with no headwayHalts when stalled
Loop detectionRepeats the same stateCaught and broken
On stallBurns budgetEscalates to a human

Stuck agents do not notice, per AgentBench and a more capable one chases a dead goal longer, so the runaway cost grows, not shrinks. (arXiv:2308.03688)

A meaningful progress check needs a definition of what progress toward the goal looks like, which is what the Pattern Intelligence Layer supplies. VibeModel ties the agent's work to the pattern that defines task success, so the system can tell whether each step actually advances toward that pattern and halt the agent when it does not, turning an unbounded loop into a bounded run that stops the moment it stops making headway.

Frequently asked questions

Won't a capable agent know to stop?
Not reliably. AgentBench shows agents are unreliable at multi-step decisions, including recognizing a lack of progress, so the stop condition has to be external.

What is a progress check?
A test that the agent is actually advancing toward the goal, by detecting repeated states, no change toward the target or oscillation and halting when headway stalls.

Isn't a step limit enough?
It is a backstop. Add progress and loop detection so a stuck agent stops in a few steps rather than burning the whole budget first.


Share this post

Join the discussion

Have a take, a war story, or a question? Sign in with GitHub to comment and react. Comments are powered by GitHub Discussions, ad-free and yours to moderate.

Continue Reading

Find where your agent breaks, before you build it

Faultmap maps where your agent will fail from the goal and your data, then hands you the first test suite it has to pass.