Re-sync Keep/Undo review UI after branch switch without re-applying agent edits

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

After switching git branches (or in other cases where review state desyncs from disk), agent-made changes can be present in files but the per-file Keep/Undo review UI disappears for some files while remaining for others.

Today the only workaround seems to be having the agent git restore everything and re-apply all edits — wasteful and slow.

Steps to Reproduce

Run agent on multiple files → switch branch or otherwise desync → some files lose Keep/Undo though git diff shows correct changes.

Expected Behavior

A way to re-open or re-sync the Keep/Undo review UI for pending agent changes already on disk (e.g. from this chat’s edit list, or by diffing against the pre-agent baseline), without rewriting files.

Operating System

MacOS

Version Information

Version: 3.8.24 (Universal)
VS Code Extension API: 1.105.1
Commit: cf80f4b937f3b9c48070d7085129a838ce7876a0
Date: 2026-06-24T06:55:08.142Z
Layout: editor
Build Type: Stable
Release Track: Default
Electron: 40.10.3
Chromium: 144.0.7559.236
Node.js: 24.15.0
V8: 14.4.258.32-electron.0
xterm.js: 6.1.0-beta.256
OS: Darwin arm64 25.5.0

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey, thanks for the detailed report with repro steps and the version.

The review state getting out of sync after switching branches is a known issue. The Keep and Undo UI is tied to an in-memory diff baseline, and when you change branches some files lose their entries even though the edits are still on disk. We’re tracking this on our side, but there’s no ETA for a fix yet.

For your main request, there isn’t a separate command right now to re-open or re-sync the review UI for changes that are already on disk without re-applying them.

The good news is the changes aren’t lost. They’re on disk and visible via git diff, so reviewing through git or the SCM panel is still a workable option while the review UI is out of sync.

If you can catch a consistent repro, like a specific sequence of branch switches where the UI disappears reliably, send it here. That’ll help us narrow it down.

lol I had Cursor write the report; hence the detail and the em-dashes :slight_smile:

If your consistent repro question is about what makes the UI disappear, I claim that that’s asking the wrong question. For starters, I might “git stash”, switch to a different branch (at which point the Keep/Undo UI has to disappear as there are no changes from HEAD), do some work, and then switch back to this branch and do a “git stash pop”. At this point, I expect to be able to resurrect the UI.

Obviously the state is all lost at this point, so really, any fix Cursor comes up with has to address this use-case rather than trying to figure out why the UI is lost in the first place. And so I claim that what users need is a way to “recreate” the Keep/Undo buttons from a combination of git diff and agentic state.

Fair point, and you’re basically right. The right framing isn’t “why does the UI disappear” but “how do we recreate it.” The git stash → switch branch → switch back → git stash pop flow shows this well. When you come back, the live baseline for the inline diff is already gone. So any solution needs to rebuild Keep/Undo from a mix of git diff and the agent state, instead of trying to “not lose” it.

Honestly, we don’t have a command for that right now. What you’re describing is less a desync fix and more a separate feature: recreate the review UI on top of changes that already exist on disk. The request makes sense and it’s logged, but I can’t promise a timeline or that it’ll be picked up soon.

For now, the only working way to review in this state is git diff or the SCM panel. Your edits on disk don’t get lost. If you find a specific sequence where the desync behaves differently than expected, send it here. It’ll help.