Question 1 of 10Agentic Architecture & Orchestration
Which loop termination condition is correct for an agentic loop built on the Claude API?
- Continue while stop_reason is "tool_use" (executing tools and appending results); stop when stop_reason is "end_turn"
- Continue for a fixed 10 iterations (executing tools and appending results); stop when the counter reaches its limit
- Continue while the assistant text announces a next step; stop when the text contains a completion word such as "done"
- Continue while responses are short (under 200 characters); stop when a response has a longer text and no tool_use block
Show answerHide answer
Correct answer: A. Continue while stop_reason is "tool_use" (executing tools and appending results); stop when stop_reason is "end_turn"
Why: stop_reason is the model's explicit signal. Iteration caps are a safety net, not the primary mechanism; parsing natural language is an anti-pattern.
CCA-F Task Statement 1.1

