Module 2 practice questions: Multi-agent architecture that survives production
15 questions · Advanced Agent Architecture and Orchestration
Practice questions written by Sanjay Shah. Not exam questions, not affiliated with or endorsed by Anthropic.
Question 1
v1 of the helpdesk is one agent with 14 tools. Traces show that on billing tickets it often calls
get_invoicewhen it neededget_order; the two tools have near-identical descriptions. What is the best first step?- A) Split the agent into five specialists straight away, one per domain.
- B) Move the agent to the most capable model available, because it will choose tools better.
- C) Give the look-alike tools sharp, distinct names and descriptions (or merge them), drop unused tools, and measure tool-choice accuracy on a fixed ticket set before deciding whether to split.
- D) Force the right tool on billing tickets with
tool_choice: {type: "tool", name: "get_order"}.
Show answer
Answer: C
- A: Splitting is the expensive option, and doing it before the cheap fix gives no evidence it was needed.
- B: A bigger model still has to choose between two tools that describe themselves the same way; it costs more and doesn't fix the cause.
- C: The traces point to confusable tools; sharper descriptions or one merged tool often fix tool choice, and the accuracy number tells you whether splitting is still needed.
- D: Forcing a tool returns a 400 on the current models used here, and it hard-codes a choice the agent sometimes needs to make the other way.
Question 2
A nightly job tags each of 5,000 tickets with one of eight categories. A teammate proposes an orchestrator that hands each ticket to a "tagging worker agent". Which design fits best?
- A) One structured-output call per ticket, with a fixed category enum, and no agent loop.
- B) An orchestrator with one worker per category, so each worker becomes an expert.
- C) A single agent with a
set_categorytool that loops until it's sure. - D) A Managed Agents session per ticket, so each ticket gets its own sandbox.
Show answer
Answer: A
- A: Tagging is one-shot classification, so a single structured call per ticket is the lowest rung that works, and it can move to batch later.
- B: Workers per category means routing needs the category first, which is the job itself.
- C: An agent loop adds turns and cost to a one-shot decision.
- D: A hosted sandbox per ticket is heavy machinery for a classification call.
Question 3
The orchestrator routes tickets by forcing a route tool with
tool_choice: {type: "tool", name: "route_ticket"}. After moving toclaude-opus-5-5, every routing request fails with a 400. What is the best fix?- A) Go back to the previous model permanently, since the new one doesn't support routing.
- B) Retry the routing request with exponential backoff until it succeeds.
- C) Alternate between forced and unforced requests, so at least half succeed.
- D) Route with structured output (a category enum) and switch on it in code, or use
tool_choice: autowithstrict: trueand check that a tool call came back.
Show answer
Answer: D
- A: The model can still route; only the forced-call request pattern is rejected.
- B: A 400 is a request error, so the same request fails every time.
- C: Half the requests still fail, and the unforced half aren't guaranteed to call the tool.
- D: Structured output gives a guaranteed shape and code does the routing (or
autoplusstrict: true, with a check for the call).
Question 4
Triage hands the billing agent the whole 40-message conversation, tool results included. Billing turns are slow and expensive, and the agent sometimes misses that an order was already partly refunded. What is the best change?
- A) Pass only the last 10 messages of the conversation.
- B) Define a typed handoff schema (run id, ticket id, order ids, a short summary,
already_refundedas a required field), and validate it on both the sending and the receiving side. - C) Move the billing agent to a model with a larger context window.
- D) Turn on server-side compaction for the billing agent, so the transcript gets summarised automatically.
Show answer
Answer: B
- A: The key fact may sit in an early message, so truncating is arbitrary loss.
- B: A schema with ids and a summary is small and clear, a required field can't silently go missing, and validating on both sides catches version mismatches.
- C: More room for a bloated handoff doesn't make it cheaper or clearer.
- D: Compaction is lossy summarising within one agent, not a contract, and can't guarantee the field survives.
Question 5
The process running a billing run is killed after the refund at step 4. On restart, the run begins again at step 1 and refunds the customer a second time. What is the best fix?
- A) Checkpoint every step (run id, step number, input hash, output) before moving on, resume from the last completed step, and make the refund idempotent with a key that survives the crash window.
- B) Wrap the entire run in one database transaction, so a crash rolls everything back.
- C) On restart, ask the model whether it already issued the refund and skip it if it says yes.
- D) Turn off automatic restarts; mark crashed runs as failed and ask the customer to submit the ticket again.
Show answer
Answer: A
- A: Checkpoints stop completed steps re-running on resume, and the idempotency key covers a crash after the refund but before its checkpoint.
- B: A rollback can't undo an external payment, and a transaction held open for minutes causes its own problems.
- C: The restarted conversation has no memory of the first run; the truth is in your database.
- D: It throws away the work and pushes your reliability problem onto the customer.
Question 6
The billing worker's
get_ordercall starts returning 500s. The orchestrator keeps re-planning and retrying, and one run reaches 60 turns before someone notices. Which two changes are best? (Choose TWO.)- A) Raise
max_tokensso the orchestrator can reason its way past the failure. - B) Retry the tool a bounded number of times in code, then return the failure as a tool result with
is_error: true. - C) Add "Stop after a few failed attempts" to the orchestrator's system prompt.
- D) Enforce max turns, max spend and a wall-clock limit per run in code, and escalate to a human queue on any breach.
- E) Remove failed tool results from the history, so the model doesn't get stuck on the failure.
Show answer
Answer: B, D
- A: The failure is in a dependency, not in reasoning space, and more tokens per call make the loop costlier.
- B: Bounded retries in code handle transient failures, and
is_errorlets the model react honestly instead of looping. - C: A prompt instruction can be ignored; limits must be enforced in code.
- D: Hard per-run limits guarantee the run ends, and escalation hands the case to a person.
- E: Hiding failures makes the model retry blindly or invent results.
- A) Raise
Question 7
In one turn the model asks for
get_orderandsearch_docs. The loop runs both, then sends eachtool_resultin its own user message. Over time, the model stops asking for tools in parallel and runs get slower. What is the best fix?- A) Turn parallel tool use off, since the model can't handle it.
- B) Run the tools one after another instead of in parallel.
- C) Put the tool results in an assistant message instead of a user message.
- D) Return all the tool results for that turn together in one user message.
Show answer
Answer: D
- A: Parallel calls are a latency win; the bug is how the results are returned.
- B: Running sequentially throws away the parallelism and doesn't fix the message format.
- C: Tool results must come back in a user message, not an assistant one.
- D: Results from one turn belong together in one user message; splitting them teaches the model to stop making parallel calls.
Question 8
To save tokens, the harness deletes old thinking blocks and trims earlier tool results before each request. Cache reads fall to almost zero, and on some accounts the API returns 400s saying a thinking block is bound to a different conversation. What is the best fix?
- A) Send only the latest user message each turn, because the API keeps the earlier conversation.
- B) Keep history append-only, passing back each response's content unchanged; if context gets too large, use a supported server-side option or start a fresh sub-run from a summary.
- C) Switch the cache to the 1-hour TTL so the trimmed history stays cached for longer.
- D) Strip every thinking block from every request, so there's nothing left to bind.
Show answer
Answer: B
- A: The Messages API is stateless by default, so you send the conversation each time.
- B: Editing history changes the cached prefix and, on the newest models, invalidates thinking blocks tied to that conversation; append-only history keeps both working.
- C: A longer TTL doesn't help a prefix that changes on every request.
- D: Stripping blocks is another history edit; it loses reasoning context and the cache still misses.
Question 9
The orchestrator fans out to five workers at the same moment. Each has a slightly different system prompt followed by the same 30,000 tokens of help-centre docs. Cache reads are zero on every request. What is the best fix?
- A) Switch to the 1-hour cache TTL.
- B) Add a cache breakpoint at the end of each worker's system prompt.
- C) Give the workers a byte-identical shared prefix (same model, tools and system prompt, shared docs first) with the worker-specific instruction at the end; send one request, wait for its first streamed token, then send the rest.
- D) Put each worker on a different model, so their caches don't compete.
Show answer
Answer: C
- A: TTL decides how long an entry lives; these entries were never shared in the first place.
- B: A breakpoint after five different system prompts still caches five different prefixes.
- C: Caching is a prefix match, so put shared content first and differences last; sending one request first matters because an entry is readable only once a response starts streaming.
- D: Caches are per model, so this guarantees no sharing at all.
Question 10
A product manager wants to add a fifth specialist, "returns". How should you decide?
- A) Run the current and proposed architectures on the same fixed ticket set, compare accuracy, cost and latency, keep the specialist only if it earns its place, and record the decision in an ADR.
- B) Add it, because more specialists always mean more accurate answers.
- C) Ask the orchestrator model whether a returns specialist would help.
- D) Ship it to all traffic and watch customer complaints for a week.
Show answer
Answer: A
- A: Architecture changes are decided by evidence on the same tickets, measuring accuracy, cost and latency, and written down.
- B: Every agent adds hops, contracts and cost, and some don't earn it.
- C: The model has no data on your production outcomes; this is an eval question.
- D: Complaints are a slow, noisy signal that arrives after the damage.
Question 11
A team wants an agent with persisted, versioned configs and long-running sessions with a file workspace. They don't want to host the agent loop or a sandbox, and they accept a beta dependency. Which surface fits best?
- A) A hand-written loop on the Messages API.
- B) The SDK's Tool Runner helper.
- C) The Claude Agent SDK, deployed on their own servers.
- D) Managed Agents.
Show answer
Answer: D
- A: The team would host everything and build config versioning themselves.
- B: Tool Runner only removes the loop code; the team still hosts the agent and has no sandbox.
- C: The Agent SDK gives the Claude Code harness but runs on your infrastructure, which the team doesn't want.
- D: Managed Agents (beta) hosts the loop and a per-session sandbox, and stores versioned agent configs for long-running sessions.
Question 12
Refunds above a limit must be approved by the reviewer agent. Traces show the billing agent sometimes calls
issue_refunddirectly without asking the reviewer. Which two changes are best? (Choose TWO.)- A) Strengthen the billing prompt: "Always ask the reviewer before refunds over the limit."
- B) Make
issue_refundrefuse any amount over the limit unless an approval record from the reviewer exists for this run and order. - C) Give the reviewer the
issue_refundtool as well, so it can do the refund itself. - D) Move the billing agent to a smaller model that follows instructions more literally.
- E) Add a test that tries a refund over the limit with no approval record and expects it to be refused.
Show answer
Answer: B, E
- A: The agent already ignores the instruction sometimes; stronger wording is still a request.
- B: A rule about money belongs in the tool, where it can't be skipped, with the reviewer's decision as a record it checks.
- C: It moves the risk to a second agent; the gate still isn't enforced.
- D: No model size turns a prompt rule into a control.
- E: A test proves the gate works and stops a later change from quietly removing it.
Question 13
One run cost about 30 times the median run. You want this never to happen silently again. What is the best combination?
- A) Hard limits in code on turns, estimated spend and wall-clock time, checked every turn with escalation on a breach; optionally a task budget so the model paces itself.
- B) A task budget on every request; since the model knows the budget, no other limit is needed.
- C)
max_tokens: 1000on every call, so no single call can be expensive. - D) A daily billing alert that emails the team if yesterday's total spend was high.
Show answer
Answer: A
- A: Hard limits in code are the guarantee and escalation makes breaches visible; a task budget is a useful but advisory extra.
- B: Task budgets are advisory pacing, not an enforced cap.
- C: Per-call caps don't stop a run from making 60 calls, and a low cap truncates real answers.
- D: A daily alert is a day late and can't tell you which run did it.
Question 14
The triage model writes the handoff, including a
tenant_idfield. A ticket with an injected instruction makes triage writetenant_id: "birch"for an alpine customer, and billing fetches birch orders. Which two changes are best? (Choose TWO.)- A) Validate that
tenant_idis one of the three known tenants. - B) Ask the reviewer agent to double-check the tenant on every handoff.
- C) Remove the tenant from the handoff; it lives on the run record, set once from the verified token.
- D) Encrypt the handoff payload between agents.
- E) Have every tool scope its queries to the run's tenant (for example through row-level security), whatever ids the handoff contains.
Show answer
Answer: C, E
- A: "birch" is a valid tenant, so the check passes; it checks format, not authority.
- B: The reviewer is another model and can be fooled by the same text.
- C: Authority data must never pass through anything a model writes; the run record holds the tenant from the verified token.
- D: Encryption protects data in transit, but the value inside is still the one the model wrote.
- E: Tools scoped to the run's tenant mean that even a forged id can't reach another tenant's data.
- A) Validate that
Question 15
After the split, the account specialist handles about 4% of tickets. On those, it's no more accurate than the generalist, and it adds an extra hop to latency. What should you do?
- A) Keep it; more modular systems are always easier to maintain.
- B) Give it more tools so it has more to do.
- C) Merge it back into another agent, record the decision and the evidence in an ADR, and keep its tickets in the eval set.
- D) Run it in parallel with billing on every ticket, so the extra hop doesn't matter.
Show answer
Answer: C
- A: Modularity costs hops, contracts and versions; "always" isn't an argument.
- B: Inventing work for an agent is backwards; tools follow needs.
- C: The evidence says it doesn't earn its keep, so merge it, record why, and keep its tickets in the eval so the question can be reopened.
- D: Running it on every ticket adds cost to the 96% that don't need it.