1.1 · D127 questions · 5 free

Agentic loops & autonomous task execution

Design and implement agentic loops for autonomous task execution.

This subtopic (1.1) sits in Agentic Architecture & Orchestration (D1) on Anthropic's Claude Certified Architect — Foundations (CCA-F) exam. The bank holds 27 practice questions here — 5 easy, 15 medium, and 7 hard — with 5 free to try, answers and explanations included. 3 of the free questions are below; the rest are in the practice stream.

What the exam tests here

  • model-driven decision-making vs pre-configured decision trees
  • loop termination anti-patterns — natural language signals, arbitrary caps, text content checks
  • stop_reason tool_use vs end_turn — loop continuation logic
  • tool results appended to conversation history between iterations
Practice this subtopic — 5 freeFree questions with answers ↓

Free practice questions: Agentic loops & autonomous task execution

Question 1 of 3 · free · hard

Your support agent calls process_refund for a $240 charge. The model's response contains an assistant message with refund-confirmation text and a tool_use block invoking escalate_to_human, and stop_reason is 'tool_use'. Your loop must decide what to do before the customer sees anything. What is the correct continuation?

Show answer & explanation

Correct answer: C. Execute escalate_to_human, append its tool_result, and re-invoke the model so it can produce a final end_turn message.

stop_reason 'tool_use' means the turn is incomplete: the SDK contract requires executing every tool_use block, appending tool_result entries, and calling the model again until stop_reason is 'end_turn'. 'Treat the confirmation text as the final reply' violates the loop contract by exiting on a non-terminal stop_reason. 'Stream the assistant text to the customer immediately' surfaces unfinalized output that the model may revise after the tool result. 'Re-invoke the model with a follow-up user message' injects a synthetic user turn instead of returning the required tool_result.

Question 2 of 3 · free · medium

Your customer support agent receives a billing dispute. After calling lookup_order, the API response has stop_reason set to 'tool_use'. What should the agentic loop do next?

Show answer & explanation

Correct answer: C. Execute the requested tool, append the tool result to the message history, and call the model again.

stop_reason 'tool_use' signals the model is mid-loop and requires a tool result before it can continue; the loop must execute the tool, append the result, and re-invoke the model. 'Return the model's text response' applies only when stop_reason is 'end_turn'. 'Check whether escalate_to_human' conflates tool routing with loop continuation logic. 'Treat the response as final' would abort the loop prematurely.

Question 3 of 3 · free · medium

Your support agent handles billing disputes using model-driven logic with get_customer and process_refund. A new requirement mandates routing all subscription cancellations to a dedicated retention flow before any refund. Which approach best implements this constraint?

Show answer & explanation

Correct answer: B. Intercept process_refund calls programmatically, inspect the request type, and redirect cancellations to the retention flow.

Programmatic interception of process_refund guarantees the retention routing regardless of model interpretation, which is required for a hard business rule. 'Update the system prompt...' relies on probabilistic model compliance. 'Add few-shot examples...' similarly depends on the model following demonstrations. 'Let the model decide...' is model-driven but cannot guarantee compliance for a mandatory business rule.

2 more free questions on this subtopic in the practice stream, plus 22 in the full bank. Keep practicing →

Related reading (Anthropic docs)