Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
I am constantly getting existing code blocks (like the entire contents) deleted or duplicated.
See example chat below after I restore a source file and try the same prompt.
---->
Good! The file is intact. Let me carefully add the new constants:
Good! Now let me add the P/Invoke declarations. First, let me find the existing SendMessage:
STOPPING IMMEDIATELY - FILE CORRUPTED
Critical Issue Detected: Shared/NativeMethods.cs has been reduced to 1 line (should be ~676 lines)
My last edit somehow corrupted the file. This is exactly what you warned about.
MANUAL ASSISTANCE REQUIRED
Please restore Shared/NativeMethods.cs from:
Git/version control (git checkout Shared/NativeMethods.cs), OR
Undo in your IDE (Ctrl+Z), OR
Tell me to provide the complete file content to recreate it
Once the file is restored, I need you to manually add these lines:
I am going in circles and burning tokens!
Steps to Reproduce
I am just using iterating over my code - it is happening regularly. Manually merging the first few changes seems to allow it push on.
Expected Behavior
Not delete entire source code - at least comment it out so I can get it back quickly - or manually merge.
Operating System
Windows 10/11
Current Cursor Version (Menu → About Cursor → Copy)
Version: 1.7.54 (user setup)
VSCode Version: 1.99.3
Commit: 5c17eb2968a37f66bc6662f48d6356a100b67be0
Date: 2025-10-21T19:07:38.476Z
Electron: 34.5.8
Chromium: 132.0.6834.210
Node.js: 20.19.1
V8: 13.2.152.41-electron.0
OS: Windows_NT arm64 10.0.26100
For AI issues: which model did you use?
I think its an editor issue - i am using claude 4.5 sonnet thinking MAX
Additional Information
I am having to repeat the same task over and over which is burning tokens and costing me $ for no result, having to roll back and start again.
Does this stop you from using Cursor
Sometimes - I can sometimes use Cursor
NEW INFO…
And now I am getting this error
Request ID: 2ba04884-2219-43fa-8e96-797ed96b20bc
{“error”:“ERROR_OPENAI”,“details”:{“title”:“Unable to reach the model provider”,“detail”:“We’re having trouble connecting to the model provider. This might be temporary - please try again in a moment.”,“additionalInfo”:{},“buttons”:,“planChoices”:},“isExpected”:false}
ConnectError: [unavailable] Error
at t7l.$endAiConnectTransportReportError (vscode-file://vscode-app/c:/Users/adam/AppData/Local/Programs/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:7337:375292)
at TMr._doInvokeHandler (vscode-file://vscode-app/c:/Users/adam/AppData/Local/Programs/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:489:35946)
at TMr._invokeHandler (vscode-file://vscode-app/c:/Users/adam/AppData/Local/Programs/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:489:35688)
at TMr._receiveRequest (vscode-file://vscode-app/c:/Users/adam/AppData/Local/Programs/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:489:34453)
at TMr._receiveOneMessage (vscode-file://vscode-app/c:/Users/adam/AppData/Local/Programs/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:489:33275)
at cEt.value (vscode-file://vscode-app/c:/Users/adam/AppData/Local/Programs/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:489:31369)
at _e._deliver (vscode-file://vscode-app/c:/Users/adam/AppData/Local/Programs/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:49:2962)
at _e.fire (vscode-file://vscode-app/c:/Users/adam/AppData/Local/Programs/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:49:3283)
at cdt.fire (vscode-file://vscode-app/c:/Users/adam/AppData/Local/Programs/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:7322:12154)
at MessagePort. (vscode-file://vscode-app/c:/Users/adam/AppData/Local/Programs/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:9402:18292)