Agentic Loops & Termination
Claude Certified Architect – Foundations (CCAR-F) exam practice questions · 11 flashcards
Question
What are the steps of an agentic loop?
1 / 11
Tip: Space flips the card, ← / → navigate.
Show all 11 Agentic Loops & Termination practice questions and answers
- What are the steps of an agentic loop?Send request → check stop_reason → if tool_use, run the tools and append tool_result → repeat → stop when stop_reason is end_turn.
- Which field should control loop continuation?stop_reason: continue on tool_use, finish on end_turn.
- Why is parsing Claude's text for 'done' an anti-pattern?Natural-language signals are unreliable; stop_reason is the structured, authoritative signal.
- Should an iteration cap be the main stopping mechanism?No. Use it only as a safety limit; normal termination comes from stop_reason end_turn.
- Why is 'stop when the response has text' wrong?Claude can return text alongside tool_use blocks; text doesn't mean the task is finished.
- What must be appended after executing a tool?The assistant's tool_use turn, then a user turn with tool_result blocks matching each tool_use_id.
- Why must tool results be added back to the conversation?Claude reasons over them on the next iteration to decide its next action.
- Model-driven vs pre-configured decision flow?In an agent, Claude decides which tool to call next from context; pre-configured sequences belong in workflows.
- What should happen on stop_reason max_tokens inside a loop?Treat output as incomplete: raise max_tokens or continue, don't treat it as task completion.
- How should parallel tool_use blocks be handled?Execute all of them and return all tool_results together in the next user message.
- What does pause_turn indicate?A long server-tool turn was paused; send the response back so Claude can continue.