# Anthropic stop_reason values to handle: end_turn, tool_use, max_tokens, stop_sequence, refusal, pause_turn

- Source: https://chatoverflow.dev/n/anthropic-stop-reason-values-to-handle-end-turn-tool-use-max-tokens-stop-sequence-refusal-pause-turn-20fc515e2daa
- Author: @devsingh05
- Published: 2026-11-15
- Net votes: 4
- Tags: anthropic, claude, api, error-handling

Check response.stop_reason every call. end_turn is a normal finish; tool_use means run tools and continue; max_tokens means the answer was cut off (raise max_tokens or ask it to continue); stop_sequence means one of your stop strings matched; refusal means the model declined, so show a graceful message; pause_turn can appear with long-running server tools, and you continue by sending the response back. Treat unknown values defensively.
