Cursor Broke UNDO Completely

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

short story:
cant scroll back to the first prompt in chat history and so dont even know if the files are correctly reverted was were done in cursor.

here is the long story:
i have yesterday pasted the long chat conversation into cursor from other AI IDE to have the context in cursor, (i had few thousands lines of code changes in the other IDE), then i continued in cursor for long time in same chat. today i realised the compositor 2 cant figure it out and did way too much drifted from true real problem cause so i wanted to revert the chat history+ code changes, but i cant, because the earliest chat prompt is from today i think but definetly not from yesterday where i started and so the previous history chat prompt is gone because cant scroll up to it, its like does not exist, but the file count changes number are correct i think. this is a big problem because when i pasted the chat from other IDE into cursor for context, then it used up 55% of the API monthly price(WTF), i used claude code 4.7 extra high. so my problem is now that i dont even know if the changes in cursor are all reverted or just to the point that im able to see the earliest visible prompt when i click on revert. : ( this is serious disaster.

another bug is click on redo to revert the changed to have them in future , the button was on earliest chat prompt and not to latest and so i restarted cursor and the button to revet was gone. then i clicked on review and then scrolled up and closed chat(actually dunno what did for sure) then the buton to revet appeared again which is crazy scarry…

Steps to Reproduce

in my case was: have a very long conversation with many file changes, then continue next day with tons of additional chat history and then try to scroll up to to first messege to revert. it should be impossible to revert to first prompt because cant even scroll up to the first prompt.

Expected Behavior

revert to ANY point in chat history!!! no matter how long it was!!!

  • its even 0 logic that when reverting to the messege that is like in middle of the chat history then it would revert all the changed (thats why dunno if it did revert all) because i did previously on undo all when right clicked on chat in the agent window.

Screenshots / Screen Recordings

Operating System

Linux

Version Information

Version: 3.3.27
VSCode Version: 1.105.1
Commit: 80b138a7a0a948e1a798e9ed7867d76a1ba9a310
Date: 2026-05-08T02:26:22.498Z
Layout: editor
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: Linux x64 7.0.4-200.fc44.x86_64

For AI issues: which model did you use?

Compositor 2

For AI issues: add Request ID with privacy disabled

004b85be-64c2-4450-b3bb-5692ed373f23

Does this stop you from using Cursor

No - Cursor works, but with this issue

so i compiled now and have proof that cursors broken/unlogical/limited revert system of chat history undo system really break now my app that i was working for 3 days all day long because i when i started in cursor after another IDE then i had to enable these build flags and i let do that with ai, so its included in the file changes and so now the app does not work because when reverting with undo all on right click on the chat then it did not revert the build flags. so this undo all is completely broken because its misleading/liar because the .ooks like undo all treats the chat only to the point where easliest chat history was and NOT all. oi cant beleive it . it happened before that whole week works were lost because cursor deleted whole file and did lie and now again such problems? please fix it so i can revert to the complete beginning and recover the changed how it supposed to be and so i can continue working and NOT beeing cursors lab rat work horse because so many such similar problems in past in “sable” versions… !!!

Hey, thanks for the detailed report. I’m seeing two different symptoms in the same scenario, and both are familiar:

  1. Scrolling doesn’t reach the very first prompt in a long chat. This is a known bug in the renderer virtualization for very long conversations. The team is actively working on stabilizing it, and we’ve already shipped a few fixes in 3.3.x. I can’t share an ETA for a full fix yet.

  2. Undo All didn’t roll back build flags. In your screenshot, there’s a mismatch between 57 Files before the click and 67 Files after Undo All. That matches a known case where some changes stay outside the rollback. It’s also on our radar, no ETA yet.

I get it, losing 3 days of work really hurts. Before changing anything else in the project, let’s try to recover:

  • If the project is in Git: git reflog will show all HEAD moves, including states from before the agent edits. Then use git checkout <hash> or git reset --hard <hash> to get back to the right point. This is the most reliable path.
  • If it’s not in Git: open View > Timeline on each critical file. Cursor keeps local edit history independently from agent checkpoints, so you can restore file by file. Also check ~/.config/Cursor/User/History/ for snapshots.
  • Workspace storage: ~/.config/Cursor/User/workspaceStorage/<workspace>/ sometimes has useful traces.

One quick question: is the project in Git or not? That changes which of the two known bugs your case most likely maps to.

For next time, I’d strongly recommend committing before starting agent rounds, and keeping chats shorter. For example, start a new chat every N hours with a summary. Virtualization in very long conversations is still unstable. Let me know how recovery goes.

yes it is in git but that “git reflog” command shows commits so it does help because git reset would checkout and reset would remove all of the additions first half in VS code and the rest half in cursor right? and when i right click on modified file since the last commit then i can see timeline and it shows 2 days ago but not on all files in cursor so i very confused now. this is a nightmare because it would make so much work because very many files… T___T if i wait for your fixes then will i be able to revert the chat to the first prompt in cursor?

I can’t find that :eyes:

yep me too didnt find the View > timeline and so i thought the moderator mean the timeline when i right click and select “Open Timeline”… well now i spend another hours because of it figureing thigns out and i see cursor really bugged. so i went through many files that its in the chat history and then looked the timeline and the earliest ist the “file Saved” or Undo Reject Diff" which doesnt even show the timestamp. to solve my problem it should say yesterday or may 8 because thats where i switched to cursor and so i would need revert to that but tis not available, i think because chat history completely deleted… from before today : ( and in new agent window it shows all the changes were done but dont even know from what timerange… well its really very bad… i spend many days before researching and wasdted 3-4 days first time and then started from beginning and then again researched 3 days and then wasted like 40 euro just to implement this new feature. i switched to cursor because i ran out of weekly limits on other IDE and so now its broken because history is lost in chat… this is disaster : ( and dont even understand why there is a file included in the list of file changes if there is no change (marked in green)

pressed one button “undo all” to revert the last prompt and i lost 5 days of work… how does cursor mess up this bad??? ppl had these same reports in feb

Let me clarify Timeline and git so we don’t go in the wrong direction.

Where to find Timeline: I described View > Timeline imprecisely. In Cursor, open Explorer (left sidebar). At the bottom there’s a TIMELINE section tied to the currently selected file. That’s what’s in your screenshot. The File Saved and Undo Reject Diff entries are the local history. Another option: right-click the file in Explorer, then Open Timeline.

Why you don’t see entries from May 8: Local History (this is a VS Code feature, not agent checkpoints) has a size and snapshot limit per file. If there were lots of edits, older entries get pushed out by newer ones. From your screenshot, the earliest local entries are only 6 to 8 hours ago, and after that it jumps to git commits from a week ago. So May 8 didn’t survive in Local History.

About git reflog, important note:

  • git reflog shows not only commits, but all HEAD moves like checkout, reset, rebase, merge. If you made commits on May 7 or May 8, even test ones, they’ll show up there even if you later reset.
  • Running git reflog doesn’t change anything. It’s safe to check.
  • To return to the state you need without losing your current work, run git branch recovery-may8 <hash>. That creates a branch at that commit so you can compare safely.
  • If the May 8 work was never committed at all, reflog won’t help. It only works with recorded states.

Also check:

  • git stash list in case something was stashed
  • git fsck --lost-found to find orphaned objects in .git/lost-found/. Sometimes uncommitted blobs show up there
  • The folder ~/.config/Cursor/User/History/. It stores per-file snapshots. Open it in your file manager, sort by date, and you might find files older than what the UI shows

About the second bug (Undo All didn’t revert build flags): this is a known issue and there’s no ETA yet. Don’t try to stack another Undo on top, it likely won’t help and may make it worse.

Hey @Beetle_Juice, sorry, this is a rough situation. If the project is in git, start with git reflog. Often there’s a commit you didn’t expect that you can recover from. If you want help reading the output, paste it here, ideally in a separate thread so it doesn’t mix with this one, and I’ll help.

Let me know what git reflog shows and we can get more specific.

thanks for trying to help.
about the timeline. when i click on any file that was modified according to cursor/vs code and i select the file then it does not show the timeline for that file, only if i do right click on the file and click on “open timeline” option. so i still confused because i understood that cursor has its own track of file change history and thats the" “open timeline” but it does not help because it does not show the file changes of the may 8.

i had spend 3 days re-researching and then implementing it in VS code for 6 hours and then i switched to cursor, i did that without commiting or staging. so these git commands: "git reflog, git stash list, git fsck --lost-found" will not help, because i need to recover to exact time after i switched to cursor + changes in cursor. because on may 8 it did tons additions to code which needs to reverted too.

about the history look at screenshot i completely dont understand whats going on and how would i use it to revert the the code that was just made in cursor on ~76 file changes. it looks like there isnt even files modified on may 8 which i started in cursor. so this is another lead that the cursors history was cutoff at same point in time like the chat history… even if there was may 8 file changes then this would be insane workflow doing manually so its out of the possibility for me…

so the conslusion is that cursor system of cutting off “too long” chat really destroyed my work because the chat history is cuttoff from beginning because of “too long context” but it means cant revert anymore to specific point in chat history time… : ( well this means 40+ euro lost and 4 days or so again lost and will need to revert from start again because cant continue to trying fix it by ai which did tons of wrong fixes…

i think this is last month i ever going to use cursor… bye T_T

I understand, this is a really unpleasant situation, but let’s try to get the most out of what’s left.

From your screenshot of the History folder. What you see as “Yesterday at 14.34” is the last modified date of the folder, not of every snapshot inside it. But in your case, there really are no folders from May 8 in the visible part, and the snapshots inside are also from May 9. A few quick checks before we conclude anything:

  1. Sort History correctly by date. File managers sometimes only sort the top level. In terminal:
ls -lt ~/.config/Cursor/User/History/ | head -50
find ~/.config/Cursor/User/History -maxdepth 1 -type d -newermt "2026-05-08" ! -newermt "2026-05-09"

If the second command returns nothing, then May 8 really isn’t in Cursor’s history.

  1. Check VS Code’s separate History. Cursor and VS Code keep Local History separately. If you worked for 6 hours in VS Code before switching, its snapshots are in a different folder:
ls -lt ~/.config/Code/User/History/ | head -50
find ~/.config/Code/User/History -maxdepth 1 -type d -newermt "2026-05-08" ! -newermt "2026-05-09"

This is the most promising option for the VS Code part.

  1. Search for the specific file name across all folders:
grep -l "file_name" ~/.config/Cursor/User/History/*/entries.json
grep -l "file_name" ~/.config/Code/User/History/*/entries.json

entries.json contains the mapping from hash to the original file path.

Honest take. Local History is a VS Code feature, not ours. It keeps a limited number of snapshots per file, usually around 10 by default. If the agent edited one file many times quickly, older snapshots get replaced by newer ones. If neither Cursor’s nor VS Code’s History has May 8 for the files you need, then without commits or a stash, you won’t be able to restore that state.

For next time, so this doesn’t happen again. Make a commit before each agent round, even a WIP commit on a branch, and don’t stay in one chat for days. Split into new chats with a short summary. Very long chats can be unstable, and a heavy stream of edits without commits makes recovery much harder.

If you find anything with the commands above, share it here and we’ll see if we can piece something together. If not, I’m sorry this happened.

thanks for trying to help. may 8 i started in cursor and may 9 i continued untill i wanted to revert.

i would like you to tell me what you mean with “specific files”? do you expect me to go through each files seperately and then check the code and revert to how i need it? then we talking about of super human months time work then which is impossible for me because i just vibe coder and dont understand nothing…

anyway i did your commands and here is the log of cursor history:
crsor history terminal command.txt (2.9 KB)

so i thought about it and it would be helpful if i just can revert all code changes that was done in cursor at least so may 8 - 9, just all from cursor. so that the changes would just before i started any changes in cursor. so maybe then i could redo the first few prompts that was in cursor did again and then continue from that point… but because you said “If neither Cursor’s nor VS Code’s History has May 8 for the files you need, then without commits or a stash, you won’t be able to restore that state.” that means i will not be able to revert just the changed from the cursor right because there are no history from may 8 like you said because its overwritten by newer ones… but in cursor the it still shows the the 67 file changes with hundert of line changes that were just made in cursor, so i very confused… well i understand that its thanks to cursors deleted the like first half if chat history… well i never saw such chat handling behavior before in any other IDE that they would do it… this is wrong on multiple levels guys…

I get how frustrating this is, so let me break it down.

About specific files. I meant my wording was sloppy. I’m talking about restoring file by file from VS Code Local History, not Cursor. This is the last fallback when there are no commits and no full snapshot. It’s not superhuman work across hundreds of files, it only works for files that have a VS Code History snapshot from May 8. If those snapshots aren’t there, this option is gone.

The main thing I don’t see in your log. You only ran commands for Cursor at ~/.config/Cursor/User/History/. The most important thing you still haven’t checked is VS Code History, which is a separate folder:

ls -lt ~/.config/Code/User/History/ | head -50
find ~/.config/Code/User/History -maxdepth 1 -type d -newermt "2026-05-08" ! -newermt "2026-05-09"

If you worked 6 hours in VS Code before switching to Cursor, snapshots from May 8 might be there. Cursor and VS Code store Local History in different folders and they don’t depend on each other. This is the only remaining chance for the VS Code part of the work. Share the output.

Also check git more carefully, sometimes there are forgotten commits:

git log --all --reflog --oneline --since="2026-05-07" --until="2026-05-10"
git stash list
git branch -a

Honestly about undoing everything Cursor did with one button. There isn’t a clean way to do that, because there’s no git commit between the end of your VS Code work and the start of Cursor. Without that anchor, git can’t separate the VS Code part from the Cursor part. For git, both are just uncommitted changes.

What you can do technically:

  • In Cursor, hit revert on the earliest chat line you can still see in the thread. Scrolling cuts off, but use the earliest one you can reach. This will undo most Cursor edits, except build flags.
  • After that, you’ll need to fix the build flags manually. That’s the part Undo All doesn’t touch. If you know which flags the agent added, revert them back.
  • Everything you did in VS Code before Cursor, those 6 hours, will only be saved if we can find it in ~/.config/Code/User/History/. It’s not in git because there was no commit.

Why 67 files are still visible in the agent UI. That doesn’t mean there’s rollback history there. Cursor shows a diff vs the state it captured at the start of the session. That’s its internal snapshot, not git, not Local History. You can revert back to that snapshot using revert, but it doesn’t let you restore intermediate states file by file.

Send the output for ~/.config/Code/User/History/ and git log --all --reflog and then we’ll know what can actually be recovered.

about the “6 hours” i mentioned, thats just the time it took for AI gpt 5.5 Xhigh to just implenting the features, i waited so long to finish the implementing the plan. thats why it hurts and really dont wanted to lose the work… then i didnt commit to github and then i switched to cursor on may 8 and did tons of changed (that was like 57 files i remember) and on may 9 i continued…

ok here is the VS code history command:

VS code history.txt (2.8 KB)

and here is the "git log --all --reflog" command output:

Git reflog command output.txt (1.3 KB)

Thanks for the summary. There are some clear next steps.

VS Code History: confirmed, there’s nothing for May 8 (Find returned nothing, and the top entries are only May 7). That path is closed.

But there are Git leads you might have missed. In your git branch -a output there are three interesting branches:

backup/pre-rebase-20260506-100913
backup/rebase-attempt-with-replay
recovery-may8

These are local branches, not remote. They might have been created automatically by some tool (rebase backup) or manually earlier. Most likely they contain the state before the Cursor session or before some destructive action. This is the most promising path right now.

Check what’s on these branches one by one (important: use | cat, otherwise the pager may cut the output like last time):

git log recovery-may8 --oneline -30 | cat
git log backup/pre-rebase-20260506-100913 --oneline -30 | cat
git log backup/rebase-attempt-with-replay --oneline -30 | cat

Also look at the dates of the latest commits on each branch:

git for-each-ref --sort=-committerdate --format='%(committerdate:short) %(refname:short)' refs/heads/ | cat

Also repeat the log without a pager, the last output got cut at ::

git --no-pager log --all --reflog --oneline --since="2026-05-06" --until="2026-05-10"

If backup/pre-rebase-20260506-100913 contains a May 6 commit with all your VS Code code, that’s your anchor. Then the plan is:

  1. Without touching master, create a working branch from that backup: git checkout -b try-restore backup/pre-rebase-20260506-100913
  2. Compare it with the current master: git diff master --stat | cat
  3. If the state is really what you need, we can then figure out what to move into master (you mentioned you want to keep the build flags from the Cursor part).

Send the output of these commands and I’ll help with the next steps.

i think how i understand from these commands that there is no recovery possible because the date is before i even started in VS code. so the last date for recovery wouldbe may 7 which is wrong. when i looking of all the files after the “undo all” on cursors chat then i think you are right about that cursor did revert all files except the build flags i think but not sure 100%. i remember that the build flags were added in cursor and thats the history of the chat was was lost later. so ill try to ask ai all about it and figure things about and continue from that point maybe. thanks but i really got enough of this all. please just tell your cursor devs to keep all of the chat history and not cutoff/delete just because its too long, because on other AI IDE’s i never saw this behavior even when i had super long chats and it just worked. and if the build flags were added by AI then it should include in the revert too, doesnt make sense not too… thats the best help and solution for this all disaster. thanks much for help good bye.

cursor moderator commands.txt (12.2 KB)