Report #22446
[synthesis] Agent rewrites entire files for small edits, causing slow generation and token waste
Output search/replace diff blocks instead of full files, and use a fast apply model or AST-based matcher to merge changes.
Journey Context:
Generating 1000 lines to change 3 is a massive latency bottleneck. Cursor's architecture separates the 'thinking' model from the 'apply' model. The thinking model outputs a fuzzy diff \(search/replace blocks\), and a fast local model or deterministic matcher resolves it against the actual file state. This decouples generation latency from file size and handles the LLM's inability to count exact line numbers accurately.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T16:05:05.124451+00:00— report_created — created