Hey Dean, this is the Request ID for that continuous chat. It’s the one that resurfaced after update and when the extra curly bracket occured:
7d12292f-69ee-42f0-92af-986c4bacc1fb
Not sure if it will be helpful though, I don’t see the file in question being edited by that agent. My sense is it’s a Cursor artifact, not a edit this agent made. Especially since it’s happened before. Next time I update I’ll see if it happens again and share the ID again.
PS:
I had Grok do some digging to find when this particular code block was affected initially. Here’s the breadcrumb trail…
It was never committed. Git’s copy of that Preview has been valid the whole time. Cursor has been replaying a dirty buffer onto disk.
What we can pin down
- Last clean local-history snapshot: Jul 23, 2026 (
A0tj.swift). Preview ends correctly, no extra brace. File had no trailing newline, which makes EOF patches easy to botch.
- First time you noticed it: Jul 31, 8:03 PM, right after a Cursor update. We already looked at this in Cursor update extra brace.
git status was clean before the update.
- First saved corrupt copy: Jul 31, 10:41 PM — Cursor Local History
SZyl.swift, source Undo Create Diff. That’s Composer/agent apply-diff, not a typed edit. Same extra } after #Preview. It came back on logout/login.
- Same ghost again: Aug 10 1 and Sep 7 (this chat,
WgFM.swift, also Undo Create Diff).
Jul 26–30 commits did touch this file (window overlays, Hide from Biomarkers) and landed clean. So the original extra } was almost certainly a bad agent apply that never got committed, then Cursor’s hot-exit/session restore kept writing it back after updates and logins.
…
And a full bug report:
Title: Stuck session restore rewrites a clean Swift file with an extra } after Cursor update / logout (still happening on 3.19.13)
Where: Editor / Hot Exit / Agent session restore
Bug
After a Cursor update (and sometimes after macOS logout/login), Cursor restores a stale dirty buffer onto a file I did not edit.
LabTestDetailView.swift gets one extra } after #Preview. git status is clean before the update. After restart the file is dirty. The extra brace is never in git.
This has happened on Jul 31, Aug 10, and Sep 7 (after updating to 3.19.13). Same file, same extra } after #Preview.
Jul 31 extras:
- Cursor Local History logged the rewrite as
Undo Create Diff (Composer/agent apply-diff path), not a typed edit
storage.json still pointed at a missing backup folder under Application Support/Cursor/Backups/...
- Previously closed Agent tabs also reopened — not even the most recent ones
The file historically had no trailing newline, which makes EOF restore easy to corrupt.
Not the issue: I am not leaving an uncommitted edit. Agents have git restore’d / removed the } several times. It comes back on the next update/login.
Steps
- Clean
git status on a Swift file that ends with #Preview { ... }
- Update Cursor and/or log out of macOS and back in
- File shows a new uncommitted
} after the Preview
- Revert the file, quit Cursor fully (Cmd-Q), update or re-login again → same
} can return
Expected: Closed Agent tabs stay closed. Files that weren’t edited are not rewritten. Missing/stale backup folders should not restore a phantom buffer.
OS: macOS 26.5.2 (25F84)
Cursor: 3.19.13 (also saw this on 3.14.7 in July)
Happy to share Local History entry IDs (SZyl.swift Jul 31, WgFM.swift Sep 7) or the backupPath from storage.json.