Question 1
A document publisher always extracts a title, applies a fixed style checklist, requests editor approval, and then exports the approved file. The order is mandated, and no step requires discovering new tasks. Which orchestration design best meets these constraints?
- Use an evaluator loop that repeats drafting until a model approves publication.
- Run extraction, approval, and export concurrently and reconcile afterward.
- Implement an explicit workflow with defined stages and an approval gate.
- Give a general-purpose agent the goal and let it choose the stage order.
Explanation
Correct Answer
C:The application already knows the execution path. Encoding that path makes the approval dependency inspectable and prevents export from being chosen before approval. Claude can still perform the language tasks within individual stages without controlling the overall sequence.
Incorrect Answers
A:An evaluator can assess a draft against criteria, but its judgment is not the required editor approval. This design also substitutes iterative model decisions for an already prescribed sequence.
B:Parallel execution fits independent work. Approval depends on the prepared document, and export depends on approval; running those operations together would violate the stated dependencies even if the results were later reconciled.
D:A model-directed plan is useful when the next action depends on discoveries. Here the order is a requirement rather than a reasoning problem, so delegating it introduces variability that the publisher does not need.
Question 2
A supervisor agent reviews three independent software packages. Each specialist needs only one package, while the supervisor must produce a single prioritized findings list. Which TWO design choices best support this division of work? Choose TWO.
- Give every specialist the entire repository and ask each to produce the final report.
- Give each specialist a bounded package scope and an explicit review objective.
- Let specialists independently change the overall review priorities during execution.
- Discard specialist evidence and ask the supervisor to rank issues from titles alone.
- Require findings with file references and severity so the supervisor can synthesize them.
Explanation
Correct Answers
B:A clear local assignment reduces duplicated exploration and keeps each specialist focused on relevant code. Independence makes concurrent review practical, while the supervisor remains responsible for coordinating the overall task.
E:A consistent handoff gives the supervisor evidence it can compare and merge. Returning actionable findings rather than every intermediate observation preserves useful context without requiring the supervisor to repeat each inspection.
Incorrect Answers
A:This duplicates the same broad responsibility across workers. It consumes additional context and creates competing final reports instead of exploiting the independent package boundaries described in the scenario.
C:Workers may discover important local facts, but independently redefining the shared objective can make their outputs incompatible. Findings should inform the supervisor’s prioritization rather than silently replace its coordination role.
D:Short titles can conceal the affected component and the basis for a severity judgment. Removing the supporting references weakens synthesis and makes it harder to distinguish duplicate reports from separate defects.
Question 3
An engineering team wants Claude Code’s built-in file tools, agent loop, permissions, and hooks inside a Python service. The team will operate the process on its own infrastructure. Which developer surface most directly matches this requirement?
- Move the agent loop to an Anthropic-hosted Managed Agents deployment.
- Replace the Python service with an interactive Claude Code terminal session.
- Embed the Claude Agent SDK in the service.
- Use only the client SDK’s basic Messages call and assume it supplies the complete agent harness.
Explanation
Correct Answer
C:The Agent SDK exposes the Claude Code agent as a programmable library, including its loop and tooling. It suits an application whose owner wants to operate the agent process while configuring its capabilities from Python.
Incorrect Answers
A:Managed Agents provides hosted orchestration. That changes who operates the agent loop, whereas this team explicitly needs the agent process embedded in infrastructure it operates.
B:The CLI is appropriate for direct terminal work. An interactive session does not provide the requested library integration into the service’s application flow, even though it exposes related agent capabilities.
D:A basic Messages call provides model access. It does not by itself install the full Claude Code execution environment, permission system, and file-tool harness requested here; those responsibilities would still need implementation or another abstraction.
Question 4
A custom Messages API loop receives an assistant response with stop_reason set to tool_use and one client-tool request. The requested operation is authorized and its input is valid. What should the harness do next?
- Execute the requested tool, retain the assistant content, and return a matching tool_result in the next user message.
- Send a new request containing only the tool definition and omit the assistant response.
- Show the tool-use block as the final answer and end the application loop.
- Wait for Anthropic to execute the custom function without application involvement.
Explanation
Correct Answer
A:The response is asking the application to perform an operation, not announcing that the user task is finished. Keeping the assistant request and returning its result with the same tool-use identifier preserves the causal link needed for Claude to continue.
Incorrect Answers
B:The definition describes an available capability but does not represent the specific pending invocation. Dropping the assistant request removes the tool-use identifier and the conversation context needed to associate a result with that call.
C:A structured call describes an intended action, not its outcome. Ending here leaves the operation unperformed and gives Claude no result from which to produce a completed response.
D:Client tools run in the application’s execution environment. Anthropic-hosted tools have different execution responsibilities; declaring a custom client function does not transfer its implementation to the API.
Question 5
An investigation agent repeatedly calls the same lookup with identical arguments and receives the same result. No new evidence appears, but the loop keeps spending tokens. Which change most directly limits this failure while allowing useful investigations?
- Lower only the maximum response length for each model call.
- Increase the context window so the agent can repeat the lookup for longer.
- Add a prompt asking the agent to stop eventually, without changing execution controls.
- Enforce an execution budget and detect repeated actions without new evidence in the harness.
Explanation
Correct Answer
D:A step, time, or cost boundary gives the application a deterministic stopping condition. Comparing repeated actions and observations also identifies lack of progress before the full budget is exhausted, allowing a controlled stop or escalation.
Incorrect Answers
A:A per-call output cap limits individual generations, not the number of tool cycles. The agent could still make many short calls that reproduce the same unproductive behavior.
B:More available context can support longer investigations, but it does not change the repeated action or add evidence. This may delay exhaustion while increasing the cost of an already unproductive loop.
C:Natural-language guidance may improve behavior but is not an enforceable run limit. The observed failure requires a boundary that still operates when the model fails to recognize its own repetition.
Question 6
A LangGraph application pauses a long task for human input. The worker process may restart before the user replies, and the application must resume the correct task state. Which design best supports this requirement?
- Keep the last displayed assistant paragraph and restart the graph from its entry node.
- Use a durable checkpointer and resume with the same thread identifier.
- Store only the user’s general preferences in a cross-thread memory store.
- Enable prompt caching and use its cache entry as the task checkpoint.
- Use an in-memory checkpointer and assign a new thread identifier after restart.
Explanation
Correct Answer
B:A checkpointer records graph state for a particular thread. Durable storage lets a replacement worker recover that state, and the thread identifier selects the paused execution to continue. Application side effects still require appropriate replay safeguards.
Incorrect Answers
A:A user-facing paragraph can omit pending operations and intermediate state. Restarting at the entry point may repeat completed work and does not establish that the original pause is being resumed.
C:Long-term preferences can inform many conversations, but they are not the graph’s current execution snapshot. The application also needs the paused thread’s state and position to resume the task reliably.
D:A cached prompt prefix accelerates repeated model input processing. It is not an application execution record containing the graph’s pending work and human-interaction state.
E:Memory held only in the lost process does not survive a restart. A new identifier also selects a different execution context rather than the original paused task.
Question 7
A product request says, “Build a fast, accurate support classifier.” Before choosing a model or deployment design, what is the most useful next engineering step?
- Choose a prompt template and use successful demonstrations as the acceptance test.
- Define acceptance measures for classification quality, response latency, load, and permitted data access.
- Select the largest model first and treat its output as the accuracy baseline.
- Optimize average response time before deciding which classification errors matter.
Explanation
Correct Answer
B:The adjectives do not yet establish a testable target. Measurable constraints let the team compare candidate implementations and distinguish acceptable tradeoffs from failures. Representative examples make the quality measure meaningful for the actual support traffic.
Incorrect Answers
A:A few successful demonstrations can guide a prototype but do not define coverage or failure tolerance. Requirements should specify what to measure across representative and difficult inputs rather than depend on selected examples.
C:Model capability is only one design input. Without a quality target and operating constraints, the team cannot tell whether the added expense or latency is justified or whether any candidate meets the product need.
D:Average speed does not define the impact of misclassification or tail latency. Optimizing this single metric prematurely can produce a fast system that fails the business requirement.
Question 8
A new prompt changes an extraction field from customer_name to account_holder. The current application parser still requires customer_name. The team intends to release the new behavior safely. Which release approach best addresses the integration risk?
- Deploy versioned prompt and parser changes together after contract tests, with rollback.
- Update only the parser in production and leave the old prompt indefinitely.
- Ask Claude to choose whichever key feels natural for each document.
- Deploy the prompt immediately because the two field names mean the same thing to a reader.
Explanation
Correct Answer
A:The model-facing instruction and the consuming code form an interface. Coordinating their versions prevents a working extraction from breaking at the parser boundary, while contract checks and a known rollback give the team evidence and a recovery path.
Incorrect Answers
B:The existing prompt may continue emitting the original key. Unless explicit backward compatibility is implemented, changing just the consumer creates the inverse mismatch rather than a coordinated transition.
C:Allowing the field name to vary makes the interface unstable. Flexible natural-language behavior can be valuable during exploration, but a production parser needs an agreed contract or a deliberately supported compatibility layer.
D:Human semantic similarity does not make JSON keys interchangeable. Code that requires a specific key can reject or lose data even when a person understands the generated field name.
Question 9
A direct Messages API application asks Claude to compare a new paragraph with one sent in an earlier request. The new request includes only the new paragraph, and Claude cannot perform the comparison. What is the most likely integration omission?
- The application selected a model with an output limit that is too small to remember input.
- The application did not reuse the prior response’s request identifier as a conversation session.
- The application did not include the earlier paragraph or relevant conversation history in the new request.
- The application failed to enable streaming for the second request.
Explanation
Correct Answer
C:A direct Messages request does not automatically recover prior conversation content from an earlier call. The application must supply the material needed for the current task, either as relevant history or as explicitly included comparison context.
Incorrect Answers
A:The output limit constrains generation. It does not retrieve omitted input from earlier calls, so increasing it would not provide the missing comparison paragraph.
B:Request identifiers support correlation and troubleshooting. They are not a substitute for providing conversational inputs to the stateless Messages API and do not cause earlier paragraphs to be loaded automatically.
D:Streaming changes how a response arrives. It does not turn separate Messages calls into a stored conversation or add absent earlier content to the model’s input.
Question 10
A response renderer assumes response.content[0].text always contains the answer. After tool use is enabled, it crashes when the first block has a different type. What is the most appropriate repair?
- Read only the final array element because the answer is guaranteed to be last.
- Dispatch on each content block’s type and render or handle only the fields defined for that type.
- Convert the whole response object to a string and show it as the assistant answer.
- Treat every non-text block as proof that the API returned a transport error.
Explanation
Correct Answer
B:The content array can carry different structured block kinds. A type-aware consumer can route tool calls to execution logic and collect text for display without assuming every block has a text property.
Incorrect Answers
A:Changing the index retains the same fragile assumption. The renderer should use explicit block types rather than rely on a universal ordering guarantee that the integration has not established.
C:Stringifying avoids the missing-property access but mixes protocol data with user-facing content. It also does not perform the required handling of tool requests or preserve a deliberate rendering contract.
D:A successful response can legitimately contain tool-use or other supported blocks. Transport failures and content types are different layers; conflating them discards valid responses.