Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
Cursor Agent stated it would revert only this conversation’s Agent Home edits, then ran git checkout HEAD – on seven tracked files. That discarded the uncommitted working copies (including work from before the chat) and replaced them with the last commit. This has happened several times and never happens when using Codex.
Steps to Reproduce
Steps to Reproduce
Open a repo with uncommitted changes on tracked files (work not in the last commit).
Start an Agent chat and have it edit those same files.
Ask the agent to revert only the changes it made in this conversation (not restore to last commit).
Observe the agent claim it is reverting conversation work, then run: git checkout HEAD –
Confirm the working copies are replaced by the last commit and the prior uncommitted content is gone.
Expected Behaviour
When asked to revert only this conversation’s edits, the agent should undo only its own changes on those files and leave all other uncommitted work intact.
It should not run git checkout HEAD (or any command that replaces working copies with the last commit) unless the user explicitly asks to discard uncommitted work and restore the last commit.
Operating System
Windows 10/11
Version Information
Cursor: 3.19.7 (d5c0e77a0214208f36b56d42e8e787de88d02ea4)
OS: Windows 11 Home (10.0.26100)
Agent model (this chat): Composer (Auto / agent router)
Transcript ID: bb5ff1eb-16b1-4220-81ce-bf50dd034bfd
For AI issues: which model did you use?
Agent
Additional Information
Additional Information
- Agent message: “Reverting the Agent Home dashboard work from this conversation.”
- Command actually run (tool description: “Restore dashboard files to last committed state”):
git checkout HEAD --on:src/components/features/agent-dashboard/DashboardOverview.tsxsrc/components/features/agent-dashboard/widgets/QuickStats.tsxsrc/components/features/agent-dashboard/widgets/RecentActivity.tsxsrc/components/navigation/AgentSidebar.tsxsrc/lib/services/agent-overview-service.tsdocs/agent/AGENT_DASHBOARD_NAVIGATION.mdscripts/seed-agent-help-articles.cjs
- User then clarified: do not revert to last commit; only undo this conversation. Damage had already occurred.
- Those paths had substantial uncommitted work (not only this chat’s edits). No backup. Checkout discarded the only copies.
- Other uncommitted files in the repo were not touched by that checkout.
- After the checkout, restored
DashboardOverviewimports a deleted module (DashboardInsights), so/agent/dashboardfails to compile. - Transcript:
bb5ff1eb-16b1-4220-81ce-bf50dd034bfd
Does this stop you from using Cursor
No - Cursor works, but with this issue