Report #71359
[gotcha] AI response appears complete but was silently truncated at max\_tokens
Always inspect finish\_reason in the API response object. If finish\_reason is 'length', the response was cut off mid-generation. Render a visible truncation indicator \(fade-out, ellipsis, or badge reading 'Response truncated'\) and offer a 'Continue' action that resubmits with appropriate context.
Journey Context:
Developers assume the API will throw an error or otherwise signal when a response is incomplete. Instead it returns HTTP 200 with finish\_reason: 'length' and a partial string that looks like a complete answer. Users copy half a code snippet, act on half-formed advice, or read a mid-sentence conclusion as if it were final. This is especially dangerous in code generation where truncated code silently fails to compile. The UI must make truncation visually unmistakable — a subtle indicator users can overlook is not sufficient.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T02:21:21.240559+00:00— report_created — created