Cursor still in 2026 says one thing and does another

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.tsx
    • src/components/features/agent-dashboard/widgets/QuickStats.tsx
    • src/components/features/agent-dashboard/widgets/RecentActivity.tsx
    • src/components/navigation/AgentSidebar.tsx
    • src/lib/services/agent-overview-service.ts
    • docs/agent/AGENT_DASHBOARD_NAVIGATION.md
    • scripts/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 DashboardOverview imports a deleted module (DashboardInsights), so /agent/dashboard fails to compile.
  • Transcript: bb5ff1eb-16b1-4220-81ce-bf50dd034bfd

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey, thanks for the detailed report, and I’m sorry this happened with your work. You asked to roll back only the edits from this conversation, but the agent reset the files to the latest commit instead.

But first, the main thing: there’s a good chance you can restore the pre-chat versions. Try this right now:

  1. Open the same chat in the Agents window.
  2. Hover over your very first message in the conversation, before the agent made any edits.
  3. Click Restore Checkpoint.

Checkpoints save every file exactly as it was right before the agent’s first edit in this chat, and git checkout doesn’t touch those snapshots. Restoring the first checkpoint should bring your files back to how they were at the start of the chat, including your uncommitted work. If you want to keep anything from the current versions, copy those files somewhere first.

If the checkpoint doesn’t help, here are two more places to check:

  • In the editor, open one of the files and open Timeline at the bottom of the Explorer panel. The Local History entries are earlier saved versions of the file. Right click then Restore Contents. You can also run Local History: Find Entry to Restore from the command palette Ctrl+Shift+P.
  • In the repo, run git stash list and git fsck --lost-found. If any of that work was ever staged, the content might still exist as dangling blobs.

Two questions so I can get the full picture: did git checkout run automatically, or did you approve it when it was suggested? And did restoring the checkpoint work?

For next time: if you add git checkout, git restore, and git reset to the deny list for terminal commands in Cursor Settings > Agents, the agent will stop and ask before running them, even with auto-run enabled. Let me know how the restore goes.