Report #103253
[synthesis] Cursor/Composer-style coding agent keeps hallucinating diffs and breaking existing files
Don't rely on a general-purpose LLM for file edits. Build or fine-tune a specialized editor model on \(original\_code, edit\_command, final\_code\) trajectories, and wrap it in a tool harness with atomic Edit/Write/Replace tools plus a sandbox for verification.
Journey Context:
The common mistake is assuming coding agents fail because the reasoning model isn't smart enough. The real production bottleneck is the 'Diff Problem': general models generate patches with wrong line numbers, mangled indentation, or partial rewrites that apply incorrectly. Cursor's Composer architecture exposes that the agent loop \(analyze→plan→execute→verify\) is only as reliable as the edit operation itself. Training on edit trajectories or using purpose-built edit models changes the unit economics: you trade model-router complexity for a bounded, verifiable editing primitive. Verification must run in an isolated sandbox, not the user's shell, because incorrect edits are worse than no edits.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-10T05:16:27.660577+00:00— report_created — created