Cursor gets confused about what files are modified, and then can’t read / write to them. Every time I open the editor, these modified files remain. I can’t save the file changes, as the “Keep All” button doesn’t work, not revert them.
Some files cursor will “touch” when I open the project, so it adds a single character return.
I ask cursor to fix it, which usually results in cursor using GIT to revert files, which isn’t the actual problem, and also doesn’t fix the issue.
Steps to Reproduce
I think its something to do with using Git Extentions and Cursor at the same time, but I am not 100% sure of the repro. Maybe opening the project / fetching the project in git Extensions while cursor is running.
Expected Behavior
Cursor’s own modified files should reflect the actual file status on Git. At the VERY LEAST, there should be a way of clearing the cursor file status cache to stop the issue from happening. I’ve had to manually delete cache folders, and lost entire project conversations and work, and the files still remain modifed.
Operating System
Windows 10/11
Current Cursor Version (Menu → About Cursor → Copy)
Hey, thanks for the report. This is a known issue and the team is working on a fix.
The issue is that Cursor sometimes adds whitespace or empty lines to files that were previously edited via Agent mode when the IDE starts up. The files become “sticky” and show up as changed even after commits.
Try these workarounds:
Open the files in the Source Control tab, click “Keep”, then remove the added empty line. The file should disappear from the list
Make a small change in any file, then stage and commit. Sometimes this “wakes up” the “Keep All” button
Rename the file, fully close Cursor, open it again, then change the name back
In the file, delete the highlighted blocks, save, then immediately Undo Ctrl+Z
Ctrl+Shift+P → Developer: Reload Window
If nothing helps, please share:
A screenshot of the git diff for those files
Which exact files show up as changed
Whether you used Agent mode with those files before
Hey Dean. Is there a way of clearing the mofied file cache? I tried deleting a load of folders with the name “cache” in the %AppData%\Cursor folder and lost all my project work / discussions, but the issue remains.
Unfortunately, there’s no safe way to clear the “modified files cache” without risking data loss. The problem is that Cursor stores file info in several places, and manually deleting folders can cause you to lose chat history and project settings (which is what happened to you).
The good news is this bug should be fixed in version 2.3.x, which has already started rolling out. You may get the update within 1 to 3 days (staged rollout). Check Help > Check for Updates.
After updating, the “sticky files” issue should be gone.
Additional info: when i create a new file using the agent, until i accept the changes it only shows the files that were modified by the last prompt (screenshot provided). After i accept the changes, all the list of files (screenshot provided).