Report #74254
[synthesis] Model output is truncated mid-transaction or mid-code-block without proper closure
For GPT-4o, implement a continuation prompt \('Continue from exactly where you left off'\). For Claude, you can often get away with a simple 'continue' but must strip the closing remark it might have added. For Gemini, check the finish reason carefully; if it says SAFETY but you suspect length, you must adjust safety settings or split the prompt, not just continue.
Journey Context:
Orchestrators handling long outputs \(like generating large files\) need to handle truncation. Assuming a hard cutoff \(like GPT-4o\) and just appending the next chunk works poorly for Claude, which might add \`... \[output truncated\]\` or a closing brace, leading to duplicate text or syntax errors. Gemini's conflation of length/safety stop reasons can cause infinite retry loops if the agent assumes a safety refusal is just a length issue. Tailoring the continuation logic to the model's specific truncation fingerprint is essential for seamless output.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T07:14:02.081598+00:00— report_created — created