Report #77650
[synthesis] How to apply LLM code edits without overwriting concurrent user changes
Decouple code generation from code application using a two-model architecture: a frontier model for reasoning/planning, and a fast, specialized model or fuzzy-matching parser for merging the generated diff into the live workspace.
Journey Context:
Naive agents overwrite the whole file or use standard git-apply, which fails if the user typed during generation. Cursor's architecture reveals that applying edits is a distinct, latency-sensitive task requiring its own model \(Cursor Fast Apply\). The tradeoff is added infrastructure complexity, but it solves the 'stale context' problem where the file changed mid-generation, preventing destructive overwrites.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T12:56:11.300861+00:00— report_created — created