# What is Termination Condition? Also called stopping criterion, loop termination. A termination condition is the rule that ends an agent's execution loop. It may be satisfaction, meaning the agent judges the goal complete, or exhaustion, meaning a limit on steps, time, cost, or consecutive failures was reached. Every autonomous loop needs at least one exhaustion condition, because satisfaction alone can never be guaranteed to trigger. Agents differ from ordinary programs in that they choose their own number of iterations. A model deciding it has finished is a judgment, not a computation, and a model that misreads its own progress can continue indefinitely. This makes termination a safety property rather than a convenience, and it belongs to the surrounding runtime rather than to the model's discretion. Satisfaction conditions are best expressed as verifiable outcomes rather than model self-assessment. A file that now exists, a test that now passes, a record whose status field changed, and a required response format that validates are all checkable by the runtime. Success defined only as the agent saying it is done cannot be distinguished from the agent giving up. Exhaustion conditions form the backstop. Step limits bound the number of iterations, wall clock limits bound latency, cost limits bound spend, and repeated failure limits catch loops where the same action fails identically each time. A well designed runtime enforces several at once, since each catches a different runaway shape. How a run ends matters as much as that it ended. Hitting a limit is a different outcome from completing the goal, and collapsing both into a generic finished state hides real failures. Runs should record which condition fired, and exhaustion should surface as an incomplete result rather than being reported as a success. ## Key points - Two families: satisfaction and exhaustion - Exhaustion limits are mandatory, satisfaction alone is unreliable - Prefer verifiable success checks to model self-assessment - Enforce several limits at once: steps, time, cost, failures - Record which condition fired; exhaustion is not success ## In practice A data cleanup agent runs until every flagged row has been reviewed, capped at 200 steps, 15 minutes, and 5 consecutive tool failures. On one run it finishes the queue at step 143 and exits satisfied. On the next the source system is unavailable, the failure counter reaches 5 at step 12, and the run ends as incomplete with the reason recorded rather than reported as done. ## Related terms - [Agent Loop](/en/glossary/agent-loop) - [Step Budget](/en/glossary/step-budget) - [Recursion Limit](/en/glossary/recursion-limit) - [Agent Run](/en/glossary/agent-run) - [Autonomy Level](/en/glossary/autonomy-level) [Back to the AI Glossary](/en/glossary)