Claude Certified Architect – Foundations Practice Question 22: Human Approval Irreversible
Claude Certified Architect, Foundations · Test 3 · question 2 of 10
An agent built with the Claude Agent SDK can issue customer refunds through a custom tool. Refunds cannot be reversed, so the business requires a human to approve each one before it runs, while read-only lookup tools should continue without interruption. What is the most reliable way to enforce this?
Show answer and explanation
Answer:
The Agent SDK's permission system lets you supply a canUseTool callback that is invoked when a tool needs approval. Your code can present the request to a human and return allow or deny, so the gate is enforced by the application rather than by model behavior. Read-only tools can be pre-allowed.
- A is wrong: bypassPermissions skips permission checks entirely, and a prompt instruction is advisory, not enforcement. - C is wrong: acceptEdits auto-approves file edits; it does not route every tool call to a human and does not cover a custom refund tool. - D is wrong: temperature changes sampling randomness, not whether a tool is called, and gives no guarantee of approval.
Reference: Handle approvals and user input (Agent SDK)