Anthropic CCA-F Practice Test 1
Question 1
A customer-support agent has requested an order-lookup tool through a tool_use response. Which TWO controller actions are needed to continue correctly? Choose TWO.
- Stop processing immediately because the assistant already emitted a response
- Return a tool_result message correlated to the pending tool call in the next model turn
- Execute the pending order-lookup tool invocation
- Invent a plausible order result and skip the external call
Explanation
Correct Answers
B:Once the client-side lookup finishes, the host must deliver its actual output in a tool_result block whose tool_use_id matches the original pending tool_use identifier. Place the result in the following user message, preserving the assistant's original tool-call message in history. This correlation prevents the assistant from attributing the response to a different lookup, particularly when several client calls were requested together. No result should be invented before execution.
C:The application must execute the order lookup requested in the pending client-side tool_use block. The model has described an operation but has not accessed the actual order database. The host should verify that the call and its arguments are authorized, run the real lookup, and capture either its returned data or a structured failure. Only after this operation can the host supply a truthful result for the assistant to interpret.
Incorrect Answers
A:The response requests a tool operation and is not a completed end_turn. In a tool-use response, a visible text block can accompany an unfinished request. The host must inspect the stop reason and pending tool identifiers; returning now leaves the requested lookup incomplete.
D:A fabricated result would misrepresent customer account state. The order status must come from the actual authorized lookup tool. A plausible-looking fabricated value could cause an incorrect refund or delivery promise, and it would hide an execution failure from the customer.
Question 2
A service agent has produced a customer-ready response with stop_reason end_turn after the previous tool result. What is the proper loop action?
- Branch explicitly on termination and continuation reasons, handling truncation or errors separately
- Terminate the agent loop and return the assistant response
- Execute the requested tool and return its result in the next model turn
- Append the tool_result tied to the outstanding tool_use identifier before continuing
Explanation
Correct Answer
B:A finished assistant response with stop_reason end_turn is the normal signal that the model has completed the current turn. After delivering the requested customer-ready response, the controller should exit its agent loop and return control to the caller. It must not execute another round of tools merely because previous iterations used tools; a new user request or explicit workflow trigger is needed to restart work.
Incorrect Answers
A:Branching on stop reasons is good controller design, but in this specific response the branch outcome is already known: `end_turn`. The application should take that completion branch and return the finished answer. A generic instruction to add more branches does not itself describe the immediate action required.
C:The tool_use stop reason indicates that the model expects the application to perform the tool invocation and provide the result. This alternative does not establish how to stop the loop on the actual completion signal in the stated workflow.
D:The assistant cannot reason reliably from an external result it never received. Although useful elsewhere, it is not the direct mechanism to stop the loop on the actual completion signal.
Question 3
A Claude response contains explanatory text plus a tool_use block. An engineer proposes ending because text exists. What is the correct interpretation?
- Inspect the stop reason and execute any requested tool_use blocks
- Preserve the ordered message history and tool-use/result relationships across turns
- Reject the call, expose a clear validation failure, and allow bounded correction
- Terminate the agent loop and return the assistant response
Explanation
Correct Answer
A:Claude can place narrative text and one or more tool_use blocks in the same assistant message. The presence of text does not make that message the final user response. The controller should examine stop_reason and the actual tool-use blocks, validate pending calls, execute authorized client tools, and send correlated results before soliciting the next model response. Only the appropriate completion signal closes the loop.
Incorrect Answers
B:Preserving message history is essential after a tool call, but history preservation alone does not decide whether the current assistant turn is finished. In this case, the response contains a tool_use block. The host must inspect stop_reason and carry out the pending call even when the same response also contains explanatory text.
C:Input-schema validation matters when a client tool proposes malformed arguments. Here no such invalid input is described; the engineer is mistaking the presence of explanatory text for completion. The host must inspect the `tool_use` block and its stop reason, then execute only authorized pending calls and return their correlated results.
D:End_turn marks completion of the assistant turn. That addresses a different part of the system, not the requirement to avoid mistaking intermediate commentary for completion.
Question 4
A refund agent performs a balance lookup but the next model request omits the tool_result message. How should the loop be repaired?
- Wait for the customer lookup and pass its result before choosing the contract tool parameters
- Append the tool_result tied to the outstanding tool_use identifier before continuing
- Reject the call, expose a clear validation failure, and allow bounded correction
- Terminate the agent loop and return the assistant response
Explanation
Correct Answer
B:The assistant's outstanding client tool call needs its actual result, associated with the same tool_use_id in the next user message. Preserve the original assistant tool_use message in the conversation history so the model can associate the refund lookup with the returning data. Omitting the result can cause an unsupported refund decision, while inserting an uncorrelated message breaks the tool-use contract.
Incorrect Answers
A:The later tool call needs information from the earlier tool response. It would leave the stated need to deliver the actual tool output to the agent unresolved.
C:Executing invalid arguments can corrupt records or fail unpredictably. This alternative does not establish how to deliver the actual tool output to the agent in the stated workflow.
D:End_turn is the successful-completion signal after Claude has the information it needs, but the tool lookup has not been returned yet. Terminating now would discard the actual balance result and risk fabricating a refund decision. Supply a correlated tool_result before asking the model to continue.
Question 5
An autonomous classifier loops through related folders without completing its task. Which THREE controller safeguards reduce runaway tool execution? Choose THREE.
- Reject the call, expose a clear validation failure, and allow bounded correction
- A stable idempotency key and read-before-retry reconciliation for the write
- Preserve the ordered message history and tool-use/result relationships across turns
- Enforce an iteration and elapsed-time budget with an explicit controlled failure path
- Detect repetitive tool calls that make no measurable progress and trigger a stop condition.
- Persist a short incomplete-task checkpoint and return an explicit failure for review.
Explanation
Correct Answers
D:An external iteration and wall-time budget establishes an enforceable maximum on autonomous search or file traversal. When either limit is reached, the controller should stop dispatching new calls, preserve actual work already completed and return a truthful incomplete result. The agent must not reset that budget merely by requesting another tool call.
E:No-progress detection catches loops even before the elapsed-time ceiling is reached. An iteration limit alone can allow repeated ineffective work until the budget expires. Compare consecutive tool names, arguments and meaningful state changes, and stop or escalate when the agent repeats itself without producing new evidence.
F:A truthful checkpoint lets an operator safely resume or repair a task without fabricating completion. Record what folders were visited, what remains unclassified, and why the execution budget was reached. This distinguishes a deliberately stopped workflow from a successful classification and allows review or resumed processing without repeating hidden side effects.
Incorrect Answers
A:Schema validation handles malformed tool arguments, not a classifier that repeatedly executes otherwise valid searches. The runaway loop can keep requesting new folders indefinitely even when every invocation passes validation. Iteration limits and no-progress detection are the controls that address this particular failure mode.
B:Idempotency keys prevent duplicate state-changing writes after uncertain retries. The classifier in this case is repeating read-only folder searches rather than retrying a write. Deduplication of a write cannot cap that loop. An iteration budget, no-progress detection and an incomplete-state checkpoint address the observed runaway exploration.
C:Keeping tool_use and tool_result history preserves the protocol but does not impose a stopping condition on repetitive autonomous behavior. A classifier could maintain perfect message history and still traverse the same folder indefinitely. The controller needs progress metrics and execution ceilings in addition to a coherent transcript.
Question 6
A research agent's database query fails due to a timeout. The controller silently replaces the result with an empty array. What is the better step?
- Stop futile retries and surface the credential error for remediation
- A stable idempotency key and read-before-retry reconciliation for the write
- Append the tool_result tied to the outstanding tool_use identifier before continuing
- Return a structured error tool_result that preserves the failure condition
Explanation
Correct Answer
D:A timeout is evidence that the database operation did not yield a usable answer; it is not evidence that the customer has zero matching records. Send a structured tool error linked to the original request and expose its retryability, without inventing an empty successful result. The agent can then retry under policy, choose another source or state that the lookup remains unavailable.
Incorrect Answers
A:A credential error indicates authorization failure, whereas this database operation timed out without reporting a 401 or other authentication problem. Presenting a credential-remediation message would invent a cause and hide the actual uncertainty. Return a structured timeout failure, not an empty successful array or an unsupported authentication diagnosis.
B:A retry after uncertain completion can duplicate side effects. That addresses a different part of the system, not the requirement to distinguish unavailable data from a genuinely empty result.
C:The assistant cannot reason reliably from an external result it never received. The decisive requirement here is to distinguish unavailable data from a genuinely empty result.
Question 7
An invoice agent must fetch a customer record before choosing the matching contract. How should the next request be scheduled?
- Stop futile retries and surface the credential error for remediation
- Append the tool_result tied to the outstanding tool_use identifier before continuing
- Terminate the agent loop and return the assistant response
- Wait for the customer lookup and pass its result before choosing the contract tool parameters
Explanation
Correct Answer
D:The later tool call needs information from the earlier tool response. A dependent action cannot be configured reliably before that required data exists. The contract-selection request depends on the customer identity and attributes returned by the lookup. Launching it early risks choosing the wrong document; after the actual lookup succeeds, bind the verified customer fields to the next call.
Incorrect Answers
A:Authentication failure will not improve through immediate identical retries. This alternative does not establish how to respect dependency order in an agentic loop in the stated workflow.
B:The assistant cannot reason reliably from an external result it never received. It would leave the stated need to respect dependency order in an agentic loop unresolved.
C:Returning a finished assistant response assumes that all necessary data has already arrived. Here the contract-selection parameters depend on a customer lookup that has not been delivered. Ending before the result is available can select the wrong contract or leave the invoice unresolved; the dependent request must wait.
Question 8
A status assistant needs today's inventory count and current weather, which do not depend on each other. What execution approach is suitable?
- Preserve the ordered message history and tool-use/result relationships across turns
- Execute the independent tool calls concurrently and return both results
- Branch explicitly on termination and continuation reasons, handling truncation or errors separately
- Gate the refund tool in application code before performing its write
Explanation
Correct Answer
B:The inventory lookup and weather lookup have independent inputs, so the application can execute both without waiting for one to finish. This lowers end-to-end latency while retaining separate tool_use identifiers and corresponding tool_result blocks. The assistant should synthesize the answer only after receiving the real results it needs; parallel execution never permits swapping one result into the other's context.
Incorrect Answers
A:Preserving message order helps correlate results after calls finish, but it does not exploit the independence of today's inventory and weather lookups. Running both strictly sequentially would add avoidable latency. Concurrent execution is appropriate, while retaining each tool identifier in the results is a separate necessary safeguard.
C:Differentiating end_turn, tool_use and pause_turn is necessary for a correct agent loop, but it does not improve scheduling of two independent lookups. Inventory and weather have no dependency edge, so execute them concurrently and match each returned result to its original tool ID before composing the answer.
D:Prompt requests alone are not deterministic safeguards for sensitive side effects. That addresses a different part of the system, not the requirement to parallelize independent operations while preserving tool-result mapping.
Question 9
An orchestrator treats all stop_reason values other than tool_use as an unequivocal final answer. Why is that unsafe?
- Execute the requested tool and return its result in the next model turn
- Reject the call, expose a clear validation failure, and allow bounded correction
- Terminate the agent loop and return the assistant response
- Branch explicitly on termination and continuation reasons, handling truncation or errors separately
Explanation
Correct Answer
D:Stop reasons encode different control outcomes: end_turn means the answer is complete, tool_use requests client execution, max_tokens reports truncation and pause_turn may require continuation of a server-side loop. Treating every non-tool-use reason as successful completion can return incomplete JSON or abandon a paused operation. A robust controller branches on the actual reason, performing recovery where necessary rather than blindly returning text.
Incorrect Answers
A:The tool_use stop reason indicates that the model expects the application to perform the tool invocation and provide the result. This capability does not directly distinguish normal completion from exceptional stops.
B:Argument-schema rejection is relevant when a requested tool call is invalid, but this failure concerns stop_reason interpretation even when no tool argument exists. A response can stop because of truncation or pause, not just completion. The controller must branch on the actual reason rather than treat all non-tool_use values as final answers.
C:End_turn marks completion of the assistant turn. The decisive requirement here is to distinguish normal completion from exceptional stops. Only an actual end_turn after completing the requested work should trigger the ordinary final-answer path. A max_tokens or pause_turn response may be incomplete even when no client tool call is pending.
Question 10
A ticket-writing agent times out after requesting a ticket creation. A retry might create two tickets. What should the controller use?
- A stable idempotency key and read-before-retry reconciliation for the write
- Stop futile retries and surface the credential error for remediation
- Return a structured error tool_result that preserves the failure condition
- Reject the call, expose a clear validation failure, and allow bounded correction
Explanation
Correct Answer
A:A retry after uncertain completion can duplicate side effects. Deduplicating the write through an idempotency key and checking its outcome makes recovery safe. A timeout gives no reliable indication whether the service committed the ticket. Reusing a stable request identifier and checking the provider record before repeating creation prevents duplicate cases and preserves a record of the attempted operation.
Incorrect Answers
B:Authentication failure will not improve through immediate identical retries. This alternative does not establish how to prevent duplicate external writes on retry in the stated workflow.
C:Treating failure as an empty successful result leads the model to make false conclusions. Although useful elsewhere, it is not the direct mechanism to prevent duplicate external writes on retry.
D:Rejecting invalid arguments cannot determine whether the first ticket-creation call succeeded before the timeout. A completely valid request can still create a duplicate when repeated after an uncertain network response. The controller needs a durable idempotency identifier and reconciliation of the first write before retrying.