PRODUCTION SCENARIO
Your content pipeline logs a spike of HTTP 200 responses whose content array is empty, whose stop_reason is refusal, and whose stop_details names a policy category. Nothing in them is truncated mid-block, and no server tool call is left waiting for a result. The on-call runbook treats every stop reason other than end_turn as a transient API error and retries the same request five times.
What is the correct way to handle these responses?
Answering here is anonymous. Nothing is saved unless you sign in.
Show answer and explanation
Answer: Read stop_details and send the request to a different Claude model
A refusal is a normal 200 response rather than an error: Claude declined to generate, stop_details names the policy category, and the documented recovery is to retry on another Claude model. Backoff is right for a retryable transport failure such as an overload, where the same request succeeds later; a refusal is deterministic, so an identical request refuses identically. Raising max_tokens is the handling for the max_tokens stop reason, where the response was cut off, and nothing here is truncated. Sending the response back is the pause_turn recovery for a server-tool loop that hit its iteration limit, and no such loop is waiting.