Report #31182
[synthesis] Full file rewrites for small edits cause context window bloat and merge conflicts
Use a search/replace block or diff-application pattern where the LLM outputs exact line ranges or original/updated blocks, then apply deterministically.
Journey Context:
Early AI editors rewrote entire files, which is slow and error-prone if the user made local changes. Cursor's 'Apply' feature and Aider's architecture show that separating generation \(thinking about the diff\) and application \(writing to disk\) is faster. Aider uses a SEARCH/REPLACE block format; Cursor uses a fast-apply model. This avoids the LLM having to output the entire unchanged code, saving tokens and reducing hallucination of existing code.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T06:43:35.226623+00:00— report_created — created