Handling a Claude response cut off at stop_reason max_tokens

CCDV-F Applications & Integration Medium Question 26 of 105

A service must hand its caller a complete summary. A Claude response comes back with stop_reason max_tokens, and the text ends midway through the second paragraph.

How should the service handle this response?

Show answer and explanation

CRaise max_tokens and re-request, or continue from where the text stopped

max_tokens means generation hit the output ceiling, so the documented fix is a larger ceiling or a continuation request. A truncation notice is the right pattern when a caller tolerates partial output, and this one does not. Echoing the assistant content back unchanged is the handling for pause_turn, where a server-tool loop hit its iteration limit. Shortening the requested summary changes the deliverable and leaves this response still truncated.

Source: platform.claude.com/docs/en/build-with-claude/handling-stop…

Anonymous, no account needed. Your tally stays in this browser.

Next question Start 5 timed questions Browse all 105 original CCDV-F practice questions