Cursor shows irrelevant diffs, how to clean?

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Cursor shows some diffs in the Makefile (on the screenshot), however no changes were made. This is indicated by git status output in the terminal. The agent is started from scratch (New chat). I tried to restart several times, even restarted macOS. Tried to close and reopen Makefile. Tried creating new chats.

The changes highlighted are probably compiled from previous chats, somehow randomly combined.

Steps to Reproduce

I don’t know how to reproduce this bug, but maybe I forgot to accept/cancel something.

Expected Behavior

After commit and in a new chat - clean files without diffs. Or some context on where those diffs come from if I forgot to process them.

Screenshots / Screen Recordings

Operating System

MacOS

Version Information

Version: 2.6.22 (Universal)
VSCode Version: 1.105.1
Commit: c6285feaba0ad62603f7c22e72f0a170dc8415a0
Date: 2026-03-27T15:59:31.561Z
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

Additional Information

After I invoke new prompts the changes doesn’t go, they persist mixed with the new ones.

Could you maybe add a >clean command to remove such buggy diffs?

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey, thanks for the report. This is a known bug. The diff and review system can sometimes keep an outdated state from previous agent sessions and show ghost diffs that don’t match the real changes in git.

The team is aware and tracking it. We don’t have an ETA yet, but reports like yours help us prioritize it.

Workaround to clear the stale diffs right now: I can see you have a Keep File button in the top right. Open both files 2 of 2 Files and click Keep File on each one. This should accept the current file state and remove the ghost diffs. For a faster flow, you can use Cmd+Enter.

Also make sure you’re on the latest version of Cursor: Help > Check for Updates. A partial fix for a similar case shipped recently.

Let me know if Keep File cleared everything.

1 Like

@deanrie, thanks for the workaround! I would try it next time. Now I forced myself through checking every change in the diff and picking the correct one.

1 Like

Thanks, hope this gets fixed as soon as possible, quite confusing to view files if we have unstaged changes.