Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
Environment
- OS: Windows 10
- Cursor: [Help → About → copy version]
- SCM: Azure DevOps TFVC (Visual Studio) — not Git
- Project: large .NET solution, many .cs/.sql with Portuguese comments (UTF-8)
Steps
- Open solution in Visual Studio — no pending changes.
- Open same folder in Cursor (no manual edits).
- Close Cursor, refresh pending changes in VS.
- Random .cs files appear as modified with diff showing “1 change” on accented characters (e.g. “edição”) but text looks identical.
- Undo/revert all in TFVC, close Cursor, reopen — different files appear again.
Expected
Opening Cursor must not write to source files.
Actual
Files on disk are rewritten from %APPDATA%\Cursor\User\History\ with source “Undo Create Diff” (agent edits).
Local file contains UTF-8 replacement chars U+FFFD (EF BF BD) instead of ç/ã.
Example: SuperiusWeb.Interface/ViewModels/…/SPE0001Interface.cs line 26.
Evidence
- Timestamps: local file LastWriteTime updates when only opening Cursor.
- History entries.json lists “Undo Create Diff” for the same file path.
- Byte compare: server has correct UTF-8; local has EF BF BD.
Workaround
Delete Cursor\User\History for affected files; or entire History folder.
Disable Codebase Indexing; files.restoreUndoStack: false; workbench.restoreEditors: none.
Use VS for TFVC check-in only.
Steps to Reproduce
Aqui vai um Steps to Reproduce pronto para colar no report (em inglês, que o time do Cursor costuma preferir):
Steps to Reproduce
Use a large .NET solution on Windows with Azure DevOps TFVC (check-in via Visual Studio, not Git).
Ensure the workspace has no pending changes in Visual Studio (Source Control Explorer / Pending Changes is empty).
Close Visual Studio (optional but recommended).
Open the same solution folder in Cursor (File → Open Folder).
Do not open any file tabs manually and do not save anything. Wait 1–2 minutes (let indexing finish).
Close Cursor completely.
Open Visual Studio and refresh Pending Changes.
Observe: one or more files appear as modified (e.g. .cs under ViewModels, .cs in Business, or .sql in Procedures).
Compare with server: diff shows “1 change” on a line with Portuguese accents (e.g. edição), but the text looks almost identical.
In Visual Studio, undo/revert all pending changes so the workspace is clean again.
Repeat steps 4–7 without editing anything in Cursor.
Observe: different files may appear as modified on each Cursor open (whack-a-mole).
Optional verification
Check %APPDATA%\Cursor\User\History\entries.json for the affected file path; entries show “source”: “Undo Create Diff”.
Check local file bytes on an accented word: corrupted files contain UTF-8 replacement character EF BF BD (U+FFFD) instead of proper ç / ã.
Operating System
Windows 10/11
Version Information
3.5.33 Vs 1.105.1
Does this stop you from using Cursor
No - Cursor works, but with this issue
Additional data point (Windows, TFVC / Visual Studio, not Git):
- Clearing only %APPDATA%\Cursor\User\History* did NOT stop the issue.
- The same file kept reappearing as modified after reopening the folder.
- Found corrupted content reapplied from:
%APPDATA%\Cursor\User\globalStorage\anysphere.cursor-commits\checkpoints
(~208 checkpoint folders). Example file:
SuperiusWeb.Interface/ViewModels/Modulos/Fiscal/Interfaces/SPE0001Interface.cs
Line 26: “edição” on server vs U+FFFD (EF BF BD) locally after Cursor open only. - Review panel / prior Agent edits on that file — same pattern as described by @deanrie.
- Settings: files.autoSave off, files.hotExit off, no files.eol override.
Happy to test a build when the fix ships.
Deleting anysphere.cursor-commits alone was not enough. Checkpoints also exist under anysphere.cursor-retrieval\checkpoints\ (~22 folders). Same metadata format (agentRequestId, requestFiles). Reopening the workspace still rewrites different files from that cache. Clearing both paths required.