Card 1 of 20
1.1 Agentic Loops
What is the correct mechanism for determining when an agentic loop should terminate?
Tap to reveal answerCheck the stop_reason field in the API response. If stop_reason == end_turn, the agent is finished. Never use text content, iteration counts, or natural language signals as the primary termination mechanism.