Every model response says why it stopped, and that one field decides whether your loop runs a tool, continues, retries or gives up. Here is what Anthropic, OpenAI and Gemini actually return, and a small dispatcher that handles all of it.
Stop reasons are your agent loop's control flow: handling every way a model turn ends
calendar_today
November 16, 2026
domain
agenttoolbox-net