A file that was not recently edited, nor has any relevant agent chat open is showing code diffs and Cursor is asking me to accept or undo the changes.
The code was committed two weeks ago.
**EDIT** After committing all the files I was actually editing, the ghost diffs for the unedited file went away, so now my IDE looks clean again. This is good as i don’t have to go line by line to ensure the correct code is in place. But, still believe this to be an annoying bug with mild panic-inducing characteristics.
EDIT 2 - After updating Cursor and restarting, another file now shows old diffs.
Sidenote, very unhelpful that I can only upload one image in the bug report.
Steps to Reproduce
I cannot be certain how to repro this but I know it has happened in previous versions of Cursor so I don’t think it’s brand new.
Expected Behavior
Old code diffs should not be showing in the UI if I don’t have the active chat open and I’ve already accepted the changes.
Here’s the active view inside my Cursor IDE. I’ve highlighted the active files that still need changes accepted in both open chats. The diffs are showing in the styles.swift file which should not have any active changes (as these were committed weeks ago).
Hey, thanks for the report and screenshots. This is a known issue. Old diffs from a review (accept or undo) can get stuck or come back even after commits and restarts. A few users have already reported it:
Close any chats that originally created those reviews, even if the changes were committed a while ago. The review state might still be hanging around.
Make a small change in the affected file, then re-index and commit. Sometimes that clears the stale diffs.
As a last resort, rename the file, fully quit Cursor, reopen it, then rename the file back.
What you noticed, where committing other active files clears the “ghost” diffs, matches what others have reported. It looks like the review state can get stuck sometimes, and git activity can shake it loose.
Let me know if these workarounds help, or if the issue keeps coming back.
Thanks Dean - for re-indexing the file, are you referring to this sync button in the settings? I haven’t done that for a while. Also will this be added to the backlog?
Also, for files in this state, is it generally safe to just use “accept all”? or would you recommend double checking the code… I’ve just been saying keep all changes on the file, then doing a pull for the main origin from git to double check it all matches.
No, the Sync button in Indexing & Docs is for codebase indexing, meaning semantic search over your code. It isn’t related to the review state. When I said “re-index,” I more meant that after a small change and commit, Cursor re-syncs the file state with git, and that can clear stuck diffs.
About “Accept All,” yes, for files in this state it’s safe. Since the changes were already committed, “Accept All” just clears the stuck review state. Just to be safe, you can run git diff after and if it’s clean, the file is fine. Your approach of pulling from origin to double-check works great too.
The team is aware of this issue. Let me know if it happens again.