A Claude response stops mid-sentence with stop_reason indicating length. What is the most likely cause?
Select an answer to reveal the explanation.
Short Explanation and Infographic
If stop_reason is length, you hit max_tokens — raise it or ask for a shorter answer.
Full explanation below image
Full Explanation
stop_reason related to max length means generation hit the max_tokens ceiling. Expired keys produce auth errors, not partial graceful length stops. Temperature 0 and empty system prompts do not inherently truncate mid-sentence.