Question 50
A production diagnostic for a production incident triage service starts from: A custom Messages API harness receives a tool_use block and mistakenly returns a final answer immediately. Which FIRST check would BEST distinguish the relevant failure or configuration problem?
Explanation
Correct Answer
Inspect stop_reason and the correlation between tool_use id and tool_result id. This isolates the initial issue, a custom Messages API harness receives a tool_use block and mistakenly returns a final answer immediately. It guides the corrective approach: implement a client-side tool-use loop that executes the request and sends a matching tool_result.
Incorrect Answers
That diagnostic helps when a tool call to a slow vendor API stalls all other workflow steps. It is not the best first discriminator for this task; check instead: inspect stop_reason and the correlation between tool_use id and tool_result id.
That diagnostic helps when a long-running migration agent repeatedly re-executes the same database update after a network timeout. It is not the best first discriminator for this task; check instead: inspect stop_reason and the correlation between tool_use id and tool_result id.
That diagnostic helps when a Python Claude Agent SDK worker needs to browse a ticket system using approved tools only. It is not the best first discriminator for this task; check instead: inspect stop_reason and the correlation between tool_use id and tool_result id.



Claude Certified Developer - Foundations (CCDV-F) Practice Tests