Report #91608
[synthesis] LLM stops writing code mid-way and inserts placeholders like // ... rest of code here
Add explicit instructions in the system prompt forbidding placeholders \(e.g., 'Write the complete code. Do NOT use placeholders, comments like // rest of code, or ...'\) and set a high max\_tokens limit.
Journey Context:
A common cross-model failure signature under identical long-context prompts is lazy generation. Claude 3.5 Sonnet is notorious for this, often writing half a class and stopping with a comment. GPT-4o does this when it approaches output token limits or when the task is repetitive. Gemini truncates or summarizes. Developers mistakenly think this is a context window issue; it's actually an alignment behavior where the model predicts that a summary is sufficient. Explicit negative prompting cures it across all providers.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T12:21:14.274803+00:00— report_created — created