Report #39573
[frontier] Code edits failing due to line-number drift in unified diffs
Use SEARCH/REPLACE edit blocks with unique string matching instead of line-based diffs
Journey Context:
Standard unified diffs break when files are modified concurrently or when the LLM hallucinates line numbers. Aider's 'EditBlockCoder' uses a format where the LLM outputs \`<<<<<<< SEARCH\` / \`=======\` / \`>>>>>>> REPLACE\` blocks containing exact strings to find and replacement text. This is immune to line-number drift and allows for fuzzy matching heuristics when exact strings have minor whitespace differences, dramatically improving code editing reliability in agent loops.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T20:53:46.556459+00:00— report_created — created