Stockertim Dictionary · Artificial intelligence
Stop condition
Also called stopping condition, stop rule, halt condition
In short
A stop condition is a rule that makes an agent end a run and hand over, for example when it reaches its step cap, finds missing data or meets a case outside its written scope.
- Intermediate
- Concept
- Checked
In detail
An agent works in a loop: decide, act, look at the result, decide again. Left alone, a loop can circle, wander off task or press on with bad information. Stop conditions are the rules that end the loop on purpose. Each says what triggers the stop and what happens next, usually passing the case with a short reason to a person or a queue.
Common stop conditions fall into a few groups. Limits: the run has used its allowed number of steps, time or money. Data problems: a required input is missing, contradictory or fails a check. Scope: the case is of a type the agent was not designed for, such as a refund request reaching an agent built for order tracking. Risk signals: the next action would need approval, or retrieved content contains instructions that conflict with the task. Repetition: the same tool is called with the same inputs several times running.
The best stop conditions are checked by the software around the model, not left to the model's judgement. A counter that ends the run at the twelfth step works however confused the model is; an instruction to stop when unsure does not.
Stopping is not failure. A handover with a clear reason is often the most useful outcome for an unusual case, and the record of why runs stopped shows where the agent's design needs work.
Worked example
A customer-service agent at Pinecrest Broadband has four stop conditions.
- Step cap: the run ends after 10 tool calls.
- Missing data: no account matches the customer's details.
- Out of scope: the customer asks to cancel a contract, which the agent does not handle.
- Repetition: the same search is made three times with identical inputs.
In each case the conversation passes to an adviser with the reason and the steps taken, rather than the agent guessing or looping.
In practice
Builders list stop conditions in the agent specification, enforce the measurable ones in code, test each by feeding cases designed to trigger it, and review the stop reasons weekly to find gaps in the design.
Watch out
- "Stop if unsure" written in a prompt is not a reliable stop condition on its own.
- A stop with no handover route leaves cases stranded.
Learn it properly
Official sources
- OWASP Gen AI Security Project: LLM Top 10 · OWASP Foundation
- Guidelines for secure AI system development · National Cyber Security Centre
Facts last checked on 9 November 2026.
Education, not advice: the Stockertim Dictionary explains what terms mean. It never recommends buying or selling anything.