CCARF Practice Question
Correct answer: B
A: Arbitrary caps do not address the root cause, and using the cap as a completion signal is itself an anti-pattern. The agent exits early because it misreads the response type; the fix is to inspect stop_reason, not to cap iterations.
B: The stop_reason field is the deterministic, authoritative signal for loop control. Claude can return text alongside tool_use blocks, so checking content type is unreliable.
C: Natural language parsing is ambiguous and unreliable. The stop_reason field already provides an unambiguous signal.
D: This forces tool use even when the agent is genuinely finished, creating an infinite loop rather than fixing the detection logic.