Report #93865
[synthesis] Model truncates code output and fails to correctly resume when prompted to continue
Implement model-specific continuation strategies: for GPT-4o, prompt 'continue from line X' and strip duplicates; for Claude, use 'continue from the exact last character'; for Gemini, re-prompt with the last 10 lines as context instead of a bare 'continue'.
Journey Context:
When hitting token limits, models exhibit distinct failure signatures. GPT-4o tends to repeat the last few lines or restart the entire block when told 'continue', due to its next-token prediction overlapping with the context. Claude usually picks up well but might wrap the continuation in a new markdown block, breaking parsers. Gemini often loses the syntactic state entirely and outputs invalid code. Assuming a universal 'continue' works across models leads to broken code. Tailoring the continuation prompt to the model's specific failure mode is necessary for seamless concatenation.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T16:08:14.827079+00:00— report_created — created