CCAR-F - Agentic Architecture & Orchestration (27% of the exam) - Section 1.1
Design and implement agentic loops for autonomous task execution.
The loop lifecycle: send a request, inspect stop_reason, execute the requested tools, append the results to conversation history, and iterate. Control flow continues while stop_reason is tool_use and terminates on end_turn. Candidates must separate model-driven decisions from pre-configured tool sequences, and must recognise the anti-patterns: parsing natural language for a termination signal, using an arbitrary iteration cap as the primary stop, or treating assistant text as a completion indicator.
agentic loop lifecyclestop_reason tool_use versus end_turntool results appended to conversation historymodel-driven decision-makingloop termination anti-patterns
A research platform team runs a coordinator agent on the Claude Agent SDK that decomposes a question and delegates to web search, document analysis, synthesis and report generation subagents. Their custom harness ends the run and returns the assistant text to the caller as soon as any assistant message contains a text block. Telemetry across 800 runs shows that 46 percent of delivered reports contain only the coordinator's stated plan for which subagents it intends to call, and none of the findings those subagents returned. Which change most effectively addresses the logged behaviour?
ARaise the maximum output tokens on the coordinator request so that a single assistant message has room to hold both the plan and the aggregated findings before the harness reads it.
BInstruct the coordinator in CLAUDE.md to withhold all narrative text until every delegated subagent has reported, so that the first text block it emits is already the finished report.
CMove report generation into a second API request that receives the subagent outputs as pre-formatted input, leaving the coordinator responsible only for issuing the delegation calls to each subagent.
DDrive the harness from stop_reason, continuing the loop while it is tool_use by appending each tool result to the conversation history and sending it back, and returning to the caller only on end_turn.check_circle Correct
An agentic loop continues while stop_reason is tool_use and ends on end_turn, not when an assistant message first contains text. An assistant message can contain a text block and one or more tool_use blocks in the same turn, so the presence of text says nothing about whether the model has finished. The loop is governed by stop_reason: a value of tool_use means the model is waiting for the caller to execute the requested tools and append the corresponding tool results to the conversation history before it can continue, while end_turn means the turn is complete. Reading text as completion truncates the run at the coordinator's planning turn.
Why A is wrong: Tempting because the delivered report is short and truncation is a familiar cause of missing content, but the findings are missing because the loop stopped, not because the message ran out of room. A larger budget on a message the model has not yet been allowed to write changes nothing.
Why B is wrong: Tempting because it appears to remove the early text block the harness reacts to, but it makes correctness depend on the model choosing to stay silent on every run. A harness defect that needs a deterministic fix is being answered with probabilistic compliance.
Why C is wrong: Tempting because splitting the work looks like it isolates the broken stage, but the harness would still cut the coordinator off at its first text block, so the subagent outputs the second request depends on would never be produced.
Why D is correct: Correct because stop_reason is the signal that distinguishes a turn the model expects to continue after tool execution from a turn it considers finished, and an assistant message may carry text and tool_use blocks together.
Exam traps in Agentic Architecture & Orchestration
Answers that look right on this material and are not. Each one is a distractor from a different question in the CCAR-F bank for this domain.
The run ends when the last tool result is returned to the harness without an is_error flag set, because a clean result tells the harness that no further model call is required to complete the delegated task.
errorWhy it is wrong: The is_error flag is real and does distinguish a failed tool result from a successful one, but success on a tool call is exactly the case where the loop must continue so the model can interpret the result and decide what to do next.
The harness reads the customer's opening message, works out in advance how many iterations the task will need, and runs exactly that many before composing a reply, so a dispute is budgeted at eleven up front.
errorWhy it is wrong: Tempting because the observed counts look like a planned budget per task type, and because plan mode makes upfront planning feel like part of the loop. It is wrong because nothing computes an iteration count in advance; the count is an emergent result of how many times the model chooses to call a tool.
The loop ends when the model returns stop_reason end_turn, and a response truncated by the output token limit is equivalent to that, because both indicate the model had nothing further it intended to emit.
errorWhy it is wrong: Tempting because both stop the current response, but a truncated response means the model was cut off mid output, which is an incomplete turn rather than a signal that the task is finished.