Stopping Condition
What is a stopping condition?
A stopping condition is a rule that tells an AI agent when to finish, pause, escalate, or abandon a task. It prevents the agent loop from continuing indefinitely and makes task completion explicit.
A useful stopping condition can represent success, failure, safety, or resource limits.
Types of stopping conditions
Common conditions include:
- the requested outcome has been produced and verified;
- no valid next action remains;
- required information or permission is missing;
- a human approval point has been reached;
- the retry, time, token, or cost budget is exhausted;
- a safety boundary blocks further action;
- the user cancels or changes the task.
For example, a research agent may stop successfully when every required question has a sourced answer. It may pause when a key document requires access, or stop unsuccessfully after several distinct search strategies find no evidence.
Stopping condition versus goal
A goal defines the desired outcome. A stopping condition defines when execution should end or pause. “Prepare a verified comparison” is a goal. “Stop when all five decision criteria have evidence and the final table passes review” is a success condition.
A goal can remain unmet when a failure condition stops the run. The agent should report that difference clearly instead of presenting partial work as complete.
Stopping condition versus model finish
A language model ending its text output is not the same as an agent completing a task. The agent may still need to execute a tool, validate a result, update state, or request approval.
Stopping should be determined by the wider system using task state, constraints, results, and policies—not only by whether the model generated a final-sounding answer.
Failure modes
Vague conditions lead to early stopping or endless loops. A model may repeatedly search for a perfect answer that does not exist, or stop after producing plausible text without checking the real outcome.
Reliable systems combine semantic completion checks with deterministic limits. They cap retries, detect repeated actions, distinguish blocked from failed tasks, and preserve partial results when useful.
Why it matters
Stopping conditions control cost, latency, safety, and user trust. They make autonomy bounded by defining when the agent must stop acting independently.
Good conditions are observable and tied to the goal. They explain whether the task succeeded, requires input, encountered a blocker, or ended because a limit was reached. See [Planning in AI Agents](/planning-in-ai-agents/) for how stopping conditions fit into plan execution.
Learn More
Planning in AI AgentsContinue with the full AIRundown guide →