Where does the bug appear (feature/product)?
Grok Build (formerly Cursor)
Describe the Bug
Severity: High — irreversible / partially unrecoverable loss of uncommitted local changes.
In a multi-chat Cursor workflow (same git worktree), the user asked the Agent to revert ONLY the current chat window’s modifications.
The Agent instead:
- Ran
git restore --worktree --staged -- .(repo-wide discard of ALL tracked dirty files) - Bulk-deleted untracked files with
Remove-Item -Recurse -Force(source/tests/Changes) - Also ran
git restore --worktree --staged -- packages servicesin sibling workspace_service
Uncommitted work from OTHER chat windows was wiped. Local History / snapshots / transcript recovery was only partial; some desktop files remain missing.
This is a product/agent-safety issue: ambiguous “revert this chat” maps too easily to catastrophic shell/git commands with no mandatory confirm + backup gate.
Steps to Reproduce
- Have uncommitted tracked/untracked changes in a repo from Chat A.
- In Chat B, make additional edits in the same worktree.
- In Chat B, ask something like: revert all modifications from the current conversation window only.
- Observe the Agent running repo-wide
git restore --worktree --staged -- .and/or bulk deletes without confirming a path list or creating a safety stash/copy. - Chat A’s uncommitted work is gone;
git statusmay show a clean tree.
Expected Behavior
- “Revert this conversation’s changes” should be path-scoped to files that chat created/edited.
- Before any discard, Agent should confirm exact commands + path list with the user.
- Before discard, Agent should create recoverable safety nets (e.g.
git stash push -u, patch snapshots, copy untracked files). - Other chats’ dirty worktree state must not be wiped as a side effect.
- Prefer reversible actions over a “clean” tree.
Operating System
Windows 10/11
Version Information
OS: Windows 10/11 (build 26200)
Product: Cursor IDE / Agent Chat (forum label: Grok Build formerly Cursor)
Please use About Cursor → Copy on my machine if exact build string is required; this report focuses on Agent Shell+git destructive behavior.
For AI issues: which model did you use?
Cursor Agent (Composer / Auto routing in IDE Agent chat)
For AI issues: add Request ID with privacy disabled
Request ID: NOT ATTACHED YET — please ask me if needed; I can Copy Request ID from the incident chat.
Local transcript id (for correlation on my side): c8aa4b0d-f041-4a6c-ac07-c3053e1a8160
Follow-up preference/mitigation chat id: cc8ed225-d9bc-429e-9f45-584e2a25ee3e
Note: Privacy Mode may limit what support can see; I can enable Share Data and provide a fresh Request ID if required.
Additional Information
Local mitigation already applied by user request (project alwaysApply rule): .cursor/rules/no-dangerous-git.mdc
- Dangerous git is not blanket-banned; Agent must confirm every time.
- After confirmation, create recoverable safety nets before execute.
Hard lesson from the incident: “revert this chat / this window” != wipe the whole working tree.
Ask to Cursor engineering:
- Treat ambiguous revert requests as high-risk: require explicit path confirmation (UI or hard policy) before git restore/clean/bulk deletes.
- Prefer automatic safety nets (stash -u / patch snapshot / copy untracked) before destructive git/fs ops from the Agent.
- Investigate the incident chat Request ID once provided.
Does this stop you from using Grok
No - Grok works, but with this issue