Cursor IDE revert-to-message operation crosses workspace boundaries and silently targets ignored files

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Cursor’s local Composer revert operation targeted files outside the active chat’s workspace, including another git repository, an ignored .env file, a tracked .gitignore file, and scratch files outside any workspace. The operation ran without a preview or confirmation. Its only direct record was a burst in composer.log; there was no corresponding mutating git command.

A separate but closely related incident two days earlier silently replaced pending, uncommitted background-agent edits at another chat’s discarded-turn boundary. That second incident did not emit a reverting to message line, so it is reported as related evidence rather than asserted to be the same internal code path.

Environment

  • Product: Cursor IDE
  • Cursor version at the time: 3.26.16, verified from currentVersion=3.26.16 in the session’s main.log
  • OS: macOS 27.0.1, build 26A434
  • Architecture: Apple silicon (darwin-arm64 appears in the Cursor update URL)
  • Session layout: 12 Cursor window log directories (window1 through window12), Multitask Mode enabled, with multiple background agents running
  • Model: not recoverable for the revert-to-message incident; the related discarded-turn incident used Claude Opus 5.5
  • Request ID: unavailable; this was a local IDE file operation rather than a failed model request

Verified incident: 2026-10-23 23:46:18–23:46:27 EDT

The session’s composer.log contains 127 file-operation entries followed by one completion entry. The file-operation entries break down as follows:

  • 42 paths in <repo-a>: 3 Processed file ... for revert operation entries and 39 Deleted non existent file entries
  • 1 path in <repo-b>: 1 Deleted non existent file entry
  • 84 paths under <scratch>: 84 Deleted non existent file entries

The first three entries explicitly include <repo-a>/.env, <repo-a>/.gitignore, and one source file:

2026-10-23 23:46:18.581 [info] [composer] Processed file file:///<repo-a>/.env for revert operation []
2026-10-23 23:46:18.582 [info] [composer] Processed file file:///<repo-a>/.gitignore for revert operation []
2026-10-23 23:46:18.582 [info] [composer] Processed file file:///<repo-a>/src/<source-file>.py for revert operation []
2026-10-23 23:46:18.583 [info] [composer] Deleted non existent file file:///<repo-a>/<file-1> []
... 123 additional file-operation entries ...
2026-10-23 23:46:27.233 [info] [composer] Completed reverting to message <message-id> []

The exact elapsed time from the first file-operation entry to completion was 8.652 seconds. Searching all available Cursor logs for the message identifier found only the completion line: there was no corresponding starting line, file-list preview, workspace declaration, or chat/composer identifier attached to the operation.

Repository inspection confirms that .env is ignored and .gitignore is tracked. The log therefore proves that the revert operation processed both ignored and tracked files. The report does not claim that every Deleted non existent file entry changed an existing file; those lines prove that the revert operation’s target set crossed repository and workspace boundaries.

Related incident: 2026-10-21 18:31 and 18:37 EDT

A background agent in a linked git worktree had pending edits made through Cursor’s edit tools. At two turn boundaries in another chat:

  • At 18:31:35.924–18:31:35.942, the Filesync log recorded 16 uploads covering exactly four pending files. At 18:31:36.285 a turn was added, and at 18:31:36.321 it was removed 36 ms later. The Python extension logged an editor-save-triggered test discovery at 18:31:36.011.
  • At 18:37:54.801–18:37:54.809, Filesync recorded four uploads of another pending test file, followed by sync entries for two source files. At 18:37:55.104 a turn was added, and at 18:37:55.137 it was removed 33 ms later. The Python extension logged test discovery at 18:37:54.956.

In both cases, pending Cursor-tool edits were replaced by older contents. Mutating git operations, stash entries, resets, and reflog changes were absent. Edits already committed survived. Two shell-made edits from the same interval also survived, while the pending Cursor-tool edits were the affected set.

No reverting to message entry appears at either discarded-turn time. This establishes a related silent checkpoint/file-sync rollback symptom, but not that both incidents used the same internal implementation.

Steps to Reproduce

Steps to reproduce

These steps are intentionally marked untested because reproducing the issue while active workspaces are open risks further data loss.

  1. Create two disposable git repositories, A and B, and open both in Cursor.
  2. In chat 1, create or edit a tracked canary in A, an ignored canary in A, and a canary in B. Send another message so there is an earlier message to revert to.
  3. From chat 2 or by hand, add distinctive uncommitted lines to all three canaries.
  4. In chat 1, use “revert to message” on the earlier message.
  5. Check whether the later lines remain, and inspect composer.log for Processed file ... for revert operation or Deleted non existent file entries naming B or the ignored canary.
  6. For the related pattern, let a background agent make an uncommitted Cursor-tool edit in a linked worktree, then start and immediately cancel or replace a turn in another chat. Check whether the pending edit remains and inspect Filesync, renderer, and Python extension logs.

Reproducibility

  • Revert-to-message cross-workspace incident: observed once with direct composer.log evidence; safe reproduction has not been attempted.
  • Related discarded-turn rollback: observed twice within one session, 6 minutes 19 seconds apart, with matching Filesync, renderer, and editor-save timestamps.
  • Overall: intermittent; the exact trigger is unknown.

Expected Behavior

A chat revert should affect only files that the same chat edited, within that chat’s workspace, and only when those files have not changed since the chat’s edit. Changed files should be skipped and reported. Files in other repositories, files outside the workspace, and ignored files should never be included merely because they were touched by another chat or agent. Before any destructive file restoration, Cursor should show the exact file list and diffs and require confirmation.

Actual behavior

  1. A revert operation assembled a target set spanning two repositories and scratch paths outside the workspace.
  2. It processed ignored files, including .env.
  3. It applied without preview, confirmation, conflict detection, or an on-screen list of affected files.
  4. The completion log did not identify the originating chat/composer or workspace.
  5. In the related incident, pending edits from a background agent were silently replaced at another chat’s discarded-turn boundary without a reverting to message log entry.

Operating System

MacOS

Version Information

Version: 3.27.12
VS Code Extension API: 1.128.0
Commit: df132ffba90dfc15a12e6b8f020ba4e5d026c4b0
Date: 2026-10-23T02:27:47.076Z
Layout: IDE
Build Type: Stable
Release Track: Default
Electron: 42.11.16
Chromium: 148.0.7778.280
Node.js: 24.19.0
V8: 14.8.178.38-electron.0
xterm.js: 6.1.0-beta.291
OS: Darwin arm64 27.0.0

For AI issues: which model did you use?

Using Sonnet, Composer and other models.

Additional Information

Impact and severity

Severity: critical data-loss risk. Cursor remains usable only with mitigations such as very frequent commits and an external file-integrity monitor. Uncommitted and ignored files can have no recoverable git copy, and the operation is silent enough that loss may not be discovered until much later.

For the forum’s “Does this stop you from using Cursor?” field: Sometimes — Cursor can be used, but background/multitask work and message reverts are unsafe without external safeguards.

Requested fixes

  1. Show the exact file list and diffs before applying any revert, and require confirmation.
  2. Restrict a revert to files the originating chat itself edited, within that chat’s workspace.
  3. Before restoring, verify that each file is unchanged since that chat’s last edit; skip and report conflicts.
  4. Never include ignored files unless the originating chat explicitly created or edited them.
  5. Log a starting line, originating chat/composer id, workspace, full file list, and per-file result.
  6. Make discarded-turn cleanup incapable of restoring file checkpoints belonging to other chats or agents.
  7. Provide a setting to disable destructive chat checkpoint restoration for background and multitask sessions.
  8. Please identify whether a fix or guard already exists and the first version containing it.

Does this stop you from using Cursor

No - Cursor works, but with this issue

Addendum: another occurrence on 24 October 2026 (local time, UTC-4)

This adds to the report I filed earlier. By composer.log there were two completed reverts on 24 October (11:11:40 and 11:49:49), so with 21 and 23 October that is four events in four days.

What the log shows (11:49). composer.log records the file work at 11:49:44: eight lines Processed file … for revert operation, one Deleted newly created file, and four Deleted non existent file. The line Completed reverting to message ec6fa0c8… follows at 11:49:49. I did not click revert, restore or undo, and I did nothing in the chat, in any folder or in the app at that time.

The eight processed paths are in three places:

  • 4 paths in a backups directory outside any repository
  • 3 paths in a second project’s repository (all three are git-ignored private files)
  • 1 scratch file under /tmp

None of the 8 paths was in the project I was working in. That project’s own files showed no revert in my file-change monitor, which recorded the revert cluster at 11:49:44, matching the log’s file lines.

What was affected.

  • Repository files: the three project files kept their old modification times. A before-and-after hash snapshot of the project folder showed no file lost and none rolled back to an older version.
  • Backups directory: one script was rewritten at 11:49:44 (same second as the log’s file lines) and did not parse afterwards (an indentation error). The other three named files in that folder kept their old modification times. Two further scripts in the same folder also show a modification time of 11:49:45 although no log line names them.
  • /tmp: the named scratch file was deleted. The log says “newly created”, and the file had been created about nine minutes earlier. The four Deleted non existent file lines are for scratch files under /tmp from earlier work.

The 11:11 event (same day). Completed reverting to message b16539c7… at 11:11:40: eight files processed, all in one project’s specs folder, followed by Deleted non existent file lines for files that no longer existed.

Why this matters. The log names files in three places, only some of them in a repository. Its effects reached a backups directory outside any repository and /tmp. Git would not have shown any of this. Together with the earlier reports, the events suggest the revert acts on files Cursor tracked from earlier turns, not only those in the workspace being edited, and it acted with no user action.

What I did not verify.

  • I have not established why the revert was triggered. The only network error the log shows near it is Plan info fetch failed … getaddrinfo ENOTFOUND api2.cursor.sh at 11:39:29, ten minutes earlier. I do not know whether it is related.
  • I cannot confirm the revert broke the script. composer.log reports the same whole-file size for that script, 1,210 lines, in diff warnings at 10:50:51 (before the revert) and at 11:49:51 (after it). That fits a break that predates the revert, but a same-length rewrite would look identical, so it is not established either way.

I can provide the composer.log excerpts and the monitor’s report for these events on request.

Hey @Nova_Spivack,

Revert to a message acts on every file that chat itself edited or created earlier, wherever it lives (another repo, a backups folder, /tmp, an ignored .env). It writes each one back to how it was at that message, permanently deletes files that didn’t exist then, and doesn’t check whether anything changed them since.

It doesn’t run on its own. Your events line up with a message being resent from an earlier point in a chat (on the 23rd and 24th, right after its reply was stopped). That reverts with no prompt if “Always revert” was ticked once. The rollbacks on the 21st also fall inside a resend in another chat, though I can’t confirm yet that this is what rewrote those files.

In the meantime:

  1. Open Cursor Settings → General → Reset “Don’t Ask Again” Dialogs. If the revert prompt is listed, reset it so you’re asked again, and let me know it was there.
  2. When the prompt appears, choose Keep Files (Shift+Enter) unless you want the rollback.
  3. Start a new chat when you switch projects, so a later revert can’t reach older work.
  4. Overwritten files may still be in Cmd+Shift+P → “Local History: Find Entry to Restore”.

Hi Colin, thanks for the detailed explanation. I checked, and I don’t think it solves what I’m seeing. Here is what I found.

  1. No revert prompt to reset. Settings → General → “Reset ‘Don’t Ask Again’ Dialogs” lists no revert prompt. I have never seen a revert prompt. The only prompts I get are overwrite-or-revert questions on two read-only README files.

  2. No stored “always revert” choice that I can find. I inspected, read-only, settings.json and the application-user preferences in globalStorage/state.vscdb. There is no revert or keep key in settings.json. The only dialog preference stored is dialogDontAskAgainPreferences = {"submit-from-previous-message-2": false}. I assume false means that dialog is not suppressed. Is that right? If false means something else, please tell me. And is “Always revert” stored anywhere else, such as server-side or a per-window or agent-mode default that never shows the dialog?

  3. Separate workspaces and chats. I run each project in its own workspace and chat. The revert still reached files outside the workspace, such as a backups folder and /tmp. So “new chat per project” wouldn’t have prevented it.

  4. I can’t say I resent a message. I don’t know whether I stopped a reply or edited an earlier message at those times. It could also have been a stalled or hung background agent, and I wouldn’t have noticed. Please say whether the harness itself can resubmit from an earlier message (the submit-from-previous-message path) when an agent stalls, errors or is retried, with no user action and no dialog.

  5. More events than the dates you cited. Counting Completed reverting to message in composer.log, local time:

    • 24 Oct 11:11:40, to message b16539c7-f11d-4f27-8ab2-38827ee14cda.
    • 24 Oct 11:49:49, to message ec6fa0c8-096d-4cb0-af5d-d9b26bed4128. It deleted a scratch file in /tmp that a running subagent had created about nine minutes earlier.
    • 24 Oct 21:45:31, to message 39977fda-1919-4ec4-862e-5435469f745c.
    • 25 Oct 13:11:47, to message ca3250a8-f237-4744-b184-2cde2ae46d88, with 18 files processed in a VYRA project. I was not working in that chat at the time.
    • Earlier: 21 Oct, and 23 Oct 23:46:19–23:46:26.

    I can send the full log excerpts and file lists.

  6. Possibly related: state.vscdb is 513 GB. globalStorage/state.vscdb takes 513 GB on disk. cursorDiskKV holds about 9.4 million agentKv rows, 8.6 million bubbleId rows, 71,399 checkpoint entries and 99,494 ofsContent entries. Is that size expected? Could that volume of checkpoints make revert or replay misbehave? Is it safe to prune, and how? (I am aware there is something in Cursor to trim that size but I’m afraid to use it if it would destroy data)

My requests: (a) Please log the trigger and reason for every revert in composer.log. Today it shows only "reverting to message ". (b) Please let me turn automatic or implicit reverts off, or limit them to files inside the workspace. (c) Please never revert files that a still-running subagent created.

Thanks.

Hi @Nova_Spivack,

Taking your questions in order:

  1. false means the prompt isn’t suppressed, so it will show. That key only gets false when a saved “Always revert” choice is restored from that Reset list, so one was set at some point and later cleared. I can’t tell when. It isn’t stored anywhere else: not server-side, not per window, not as a Multitask or agent default.
  2. Cursor can’t resend from an earlier message on its own. Retries, auto-resume, queued messages, stalled agents and subagents never revert files. Only sending from an earlier message, or Restore Checkpoint, does.
  3. Both new reverts were in one chat. Each came right after a message sent in that chat was stopped and a message was then sent again from an earlier point (on the 25th, that send was about a minute before the revert). After Stop, the cursor can land in the stopped message’s edit box, and the revert prompt has Revert Files focused, so Enter accepts it. That chat has worked in several folders, so its revert reaches all of them, even with one chat per project.
  4. The database size is a known issue, and I’ve added your report to it. I found nothing linking it to which files a revert touches. To shrink it safely, export chats you want to keep (Export Chat in the Command Palette), then run Developer: GC Agent KV Blobs. It keeps your chats, needs free disk roughly the file’s size, and stops before compacting if there isn’t enough. At this size it can run a long time, so leave Cursor open.

For now, after pressing Stop, click into the main input before typing.

One correction: I said I wasn’t working in that VYRA chat at 13:11 on 25 Oct. I had VYRA open in another workspace window at that time, so that chat may well have been active. Thanks, that matches your timeline.

I will monitor this for a bit and see if it improves with your suggestions

these might still be helpful for analyzing these kinds of situations - My requests: (a) Please log the trigger and reason for every revert in composer.log. Today it shows only "reverting to message ". (b) Please let me turn automatic or implicit reverts off, or limit them to files inside the workspace. (c) Please never revert files that a still-running subagent created.