Editor can lose/overwrite code during iterative edits

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

I encountered a serious issue where Cursor intermittently lost or overwrote code while editing a Vue file. Symptoms: content became inconsistent with recent edits, some write operations failed/hung, and previously corrected sections regressed. Impact: repeated code loss and inability to safely continue editing. Please investigate editor write/apply stability.

Steps to Reproduce

  1. Open a Vue file in editor (example: index.vue).
  2. In Agent chat, request automatic edits to this exact file (any template/script/style update).
  3. Accept/apply the agent’s file changes.
  4. Without switching files, manually edit one line in the same file in editor.
  5. Save (Cmd+S).
  6. Check content/diff of that file.

Operating System

MacOS

Version Information

Version: 3.2.16
VSCode Version: 1.105.1
Commit: 3e548838cf824b70851dd3ef27d0c6aae371b3f0
Date: 2026-04-28T21:07:47.682Z
Layout: editor
Build Type: Stable
Release Track: Default
Electron: 39.8.1
Chromium: 142.0.7444.265
Node.js: 22.22.1
V8: 14.2.231.22-electron.0
OS: Darwin arm64 25.4.0

Does this stop you from using Cursor

Yes - Cursor is unusable

Hey, thanks for the detailed report. This is a known pattern. The Agent in later turns can overwrite manual edits, even if the new request is not related to that code. We’re tracking the issue, but I can’t share an ETA for a fix yet.

What can help right now:

  • Before your next request to the Agent, do a git commit or git stash of your manual edits. Then if they get overwritten, it’s easy to roll back via git reflog.
  • If you edit things manually between Agent turns, call it out in your next message, for example “I just manually changed X in file Y, don’t touch that.” The model gets a diff of your changes in the prompt, but without an explicit note it may still overwrite them.
  • To recover what’s already lost, try Checkpoints, the restore arrow in the chat on the right message, or VS Code Local History, Cmd+Shift+P > Local History.

If you catch a fresh case, send the Request ID, chat top right corner > Copy Request ID, and the piece of the prompt that caused the regression. That’ll help the team reproduce it more reliably.