Report #73962
[synthesis] Inconsistent code diff formatting when requesting modifications across models
Specify the exact diff format \(e.g., 'Output ONLY unified diff format starting with --- a/file and \+\+\+ b/file'\) in the system prompt, as default behaviors vary wildly.
Journey Context:
Without explicit format instructions, Claude 3.5 Sonnet defaults to outputting search-replace XML blocks or full file rewrites with comments like // rest of code here. GPT-4o often outputs a mix of conversational text and code snippets. Gemini often rewrites the entire file. To get reliable, machine-parsable diffs, you must mandate a specific format like standard unified diff, as no model defaults to it reliably for complex multi-file edits.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T06:44:32.979811+00:00— report_created — created