Index Ai Academy
Glossary · Phase 10 · Agent harnesses

Stop reason

Also written: stop reasons, stop_reason

The field in each Messages API reply that says why the model stopped, such as end_turn, tool_use or max_tokens. The loop branches on it.

Try it now

Watch delay double after each temporary error. The 200 ends the loop, so the third wait never happens.

Learn it properly

The core loop, built properly · Stop reasons, parallel tool calls, errors and turn budgets. About 35 minutes.

Create a free account See what's in the lesson

Other terms from the same lesson

Never trained an AI?

Teach a small one to write, right in your browser. It takes about 20 seconds and needs no account.

Teach it to write