CCAR-F practice › Agentic Architecture & Orchestration · Question 1 of 105

Agentic Architecture & Orchestration

A team is writing the control flow for an agentic loop that calls Claude with a set of tools. Which loop design matches how the loop is meant to work?

Show answer and explanation

Answer: B — Loop while stop_reason is "tool_use", appending each tool result; stop when it is "end_turn"

The loop should branch on stop_reason: on "tool_use", run the requested tools, append the results, and call again; on "end_turn", the model has finished. A fixed cap as the primary stop (a) truncates legitimate work — a cap belongs only as a secondary safety guard. Text blocks (c) can accompany a tool_use request, and phrase matching (d) is a fragile natural-language heuristic.