Stop Condition
The rule that tells an agent it’s done — or that it should quit trying.
Think of it like
The timer on the oven — it doesn’t decide the food is perfect, it just decides when to stop cooking.
Example
The agent stops when the task returns “success,” when it hits ten steps, or when it says the magic phrase that means “I’m finished.”
How it actually works
Every agent loop needs a way out, and there are usually several: task success, an explicit “done” signal from the model, a step or token ceiling, or an error the agent can’t recover from. The tricky part is a stop that fires too early (gives up on solvable work) or too late (keeps flailing). Good stop conditions blend a success test with a safety cap.
For product teams
Where you set the stop line decides the balance between giving up too soon and wasting money too long.
For engineers
A predicate evaluated each iteration — success, explicit termination, resource ceiling, or unrecoverable error.
Related
- Max Iterations — The blunt version — a hard step cap.
- Looping — What it prevents when things go wrong.
Read anything AI without the jargon
Look up any term in plain English, or save terms as you read with the free Chrome extension.
Open DecoderAdd to Chrome