A stopping criterion is a rule that tells an iterative agent when to terminate instead of starting another sense–plan–act cycle. The agent may stop because it satisfied the goal, reached a safety boundary, met a quality bar, or stopped making meaningful progress. section 9.1.1 section 9.2.4
Layer stopping criteria so success checks and defensive controls work together:
- Hard limit: stop after a maximum number of iterations or turns; always include this safety net. section 9.2.4 section 11.1.3
- Budget limit: stop when token or cost spending reaches its ceiling. section 9.2.4
- Goal satisfaction: stop when the agent declares the goal complete, while recognizing that self-assessment may be biased. section 9.2.4
- Quality threshold: stop when an evaluator or self-evaluation exceeds the required confidence level. section 9.2.4
- Stagnation detection: stop when successive outputs remain too similar and the agent is producing diminishing returns. section 9.2.4
A practical termination gate
A research loop can check, in order, whether it has exceeded its iteration cap, exhausted its budget, satisfied the goal, passed a quality threshold, or stagnated. For stagnation, compare consecutive iteration summaries with vector embeddings and cosine similarity; repeated overlap above a chosen threshold can trigger exit. A small planning agent illustrates the hard limit with MAX_TURNS = 3 and a typed Answer model carrying status, checklist, summary, and sources. section 9.2.4 section 11.1.3
Figure 9.1 The core agentic loop. The agent cycles through sense, plan, act, and evaluates the steps until the goal is satisfied or a termination condition is triggered. Internal state accumulates across iterations, giving each cycle more context than the last.
Use the core-loop figure to see where the stopping criterion sits: after sensing, planning, acting, and evaluating, before another iteration begins. section 9.1.1










