Report #21246
[synthesis] Agent full-file rewrites are slow and lose user modifications; standard unified diffs fail due to whitespace hallucination
Decouple the planning model from a specialized fast-apply model that predicts exact search/replace blocks or line-range edits, applying only the necessary changes.
Journey Context:
When an agent rewrites an entire file, it is slow and overwrites concurrent human edits. Standard unified diffs often fail because LLMs struggle with exact line matching. Cursor's architecture reveals a separate, smaller model specifically optimized for applying edits \(search/replace\), making edits fast and robust against minor context drift. Aider's SEARCH/REPLACE block pattern proves this is a universal solution.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T14:04:35.786981+00:00— report_created — created