Courseiva

CCAR-F Agentic Architecture and Orchestration Practice Question

An orchestration layer runs a research agent that can call a web_search tool and a summarize_document tool. The architect wants the agent to keep iterating until it has gathered enough sources, but must cap total model calls and total tool executions to control cost and prevent runaway loops. Which approach best enforces those caps while preserving the agent's ability to decide when it is done?

⚠ Common exam trap

The trap here is relying on prompt instructions or max_tokens to bound an agent loop, when only host-side counters can actually enforce an iteration or execution budget.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

Wrap the loop in application code that counts iterations and tool calls, stops when either budget is exhausted, and lets Claude signal completion by returning a final answer with no tool_use block.

Hard cost and safety limits belong in the orchestrator, which can count model calls and tool executions and stop deterministically at a budget boundary. Allowing Claude to end the loop by returning a response with no tool_use block keeps the agent in control of when its task is complete, so the two mechanisms together give bounded but adaptive behavior.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    Set a very high max_tokens on every request so Claude naturally stops once it has written enough, avoiding the need for an explicit iteration limit.

    Why it's wrong here

    max_tokens caps output length for a single response and says nothing about how many requests or tool executions occur. A high value actually increases per-call cost and can prolong verbose responses. It cannot bound the number of loop iterations, so a runaway agent would still consume unbounded calls while each individual response stays within the ceiling.

  • ✗

    Instruct Claude in the system prompt to stop after at most ten tool calls and trust the model to count its own invocations accurately.

    Why it's wrong here

    Models do not reliably track cumulative counts across turns, and a prompt instruction is advisory rather than enforcing. If the agent miscounts or ignores the limit, nothing in the system prevents additional calls. Cost and safety budgets must be enforced by deterministic host code, with the prompt used only as a soft hint about desired behavior.

  • ✗

    Configure the tools with a strict input_schema so malformed arguments cause the API to reject extra calls once a threshold is reached.

    Why it's wrong here

    input_schema validates the shape of arguments for a single call; it has no concept of cumulative call counts and cannot throttle an agent. Invalid arguments would simply produce a validation failure for that call, not a budget-aware stop. Schema strictness improves correctness of individual tool invocations but does nothing to cap total iterations or executions.

  • ✓

    Wrap the loop in application code that counts iterations and tool calls, stops when either budget is exhausted, and lets Claude signal completion by returning a final answer with no tool_use block.

    Why this is correct

    The orchestrator owns the loop, so it can track model calls and tool executions against explicit budgets and halt deterministically when a cap is hit. Letting Claude finish by returning a normal response with no tool_use block preserves model-driven completion within those bounds, combining hard cost control with flexible termination.

About these practice questions

This CCAR-F question is part of Courseiva's 271-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official Anthropic exam blueprint

This CCAR-F practice question is part of Courseiva's free Anthropic certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the CCAR-F exam.