AI / Claude OPUS5 Interview questions
How do you troubleshoot an Opus 5 response truncated at max_tokens?
First confirm whether thinking is running on the affected request - since Opus 5 runs thinking by default, and thinking tokens share the same max_tokens budget as the visible reply, this is the most likely cause if the same request and max_tokens value worked fine on Opus 4.8 without truncation.
Check the actual token breakdown in the response, thinking tokens versus reply tokens, to confirm how much of the budget thinking is actually consuming for this specific type of request, rather than assuming a fixed proportion, since thinking depth scales with the configured effort level and the task's complexity.
If confirmed, the fix is to raise max_tokens to account for the added thinking budget, lower the effort level so thinking consumes less of the shared budget, or, if thinking genuinely isn't needed for this request type and effort is high or below, explicitly disable thinking.
Going forward, it's worth explicitly testing max_tokens headroom as part of migration validation for any request pattern that was previously tuned assuming the full budget went to the visible reply, rather than discovering the issue only when it surfaces in production as unexpectedly truncated answers.
More Related questions...