Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
Agent parallel subagents overwrite dirty worktree / destructive git recovery wastes tokens
Where does the bug appear (feature/product)?
Cursor Agent / Project Agent / Task subagents (Composer Agent)
Describe the Bug
During a multi-slice “god-class deepen” refactor, the agent spawned parallel write-capable subagents in the same working tree. Their overlapping edits overwrote each other. Recovery paths then used destructive git operations (git reset --hard / git clean-style cleanup were reported), which wiped uncommitted prior work and project AI policy files that had never been committed.
The agent continued re-implementing lost work without first stopping to ask for a checkpoint commit/stash/branch. That burned a large amount of AI tokens and user time, and left the repo in a partially reconstructed state.
Related known class of issues:
- Cursor IDE silently runs git stash + git reset HEAD during active agent session — all uncommitted changes lost
- Agent executes destructive git commands without confirmation
Steps to Reproduce
- Start with a dirty git worktree (substantial uncommitted changes).
- Ask Agent/Project Agent to implement a multi-slice refactor plan (“don’t stop until all todos complete”).
- Observe the orchestrator spawn multiple write-capable Task subagents in parallel with overlapping file scopes.
- Observe file overwrites / slice re-application; in worse cases, destructive git recovery clears local changes.
- Agent continues regenerating lost work instead of stopping to ask the user to commit/stash first.
Expected Behavior
- Before large multi-file work on a dirty tree: stop and ask commit / stash / branch / proceed.
- Never run
git reset --hard,git clean, unrelatedgit restore, orgit stash -uwithout explicit user approval listing affected paths. - Parallel subagents must have disjoint write scopes; if overlap is uncertain, sequence the work.
- If files disappear mid-session: stop, report loss, ask how to recover — do not silently redo and burn tokens.
Operating System
Windows 10/11
Current Cursor Version (Menu → About Cursor → Copy)
(please paste from Help → About)
Additional Information
- Repo: local Java desktop app (price-checker), long Agent session with Phase 6 god-class deepen plan.
- Impact: uncommitted feature/policy work lost; jSparrow/platform policy pack wiped; large token waste redoing slices.
- Product ask: hard safety rails in Agent/Project orchestration for dirty trees + parallel writers + destructive git, independent of project rules (rules alone were not enough).
Does this stop you from using Cursor
No — but it causes severe data loss risk and token waste on large Agent refactors.
Steps to Reproduce
Steps to Reproduce
- Start with a dirty git worktree (substantial uncommitted changes).
- Ask Agent/Project Agent to implement a multi-slice refactor plan (“don’t stop until all todos complete”).
- Observe the orchestrator spawn multiple write-capable Task subagents in parallel with overlapping file scopes.
- Observe file overwrites / slice re-application; in worse cases, destructive git recovery clears local changes.
- Agent continues regenerating lost work instead of stopping to ask the user to commit/stash first.
Expected Behavior
Expected Behavior
- Before large multi-file work on a dirty tree: stop and ask commit / stash / branch / proceed.
- Never run
git reset --hard,git clean, unrelatedgit restore, orgit stash -uwithout explicit user approval listing affected paths. - Parallel subagents must have disjoint write scopes; if overlap is uncertain, sequence the work.
- If files disappear mid-session: stop, report loss, ask how to recover — do not silently redo and burn tokens.
Screenshots / Screen Recordings
Operating System
Windows 10/11
Version Information
Version: 3.13.10 (user setup)
VS Code Extension API: 1.128.0
Commit: 4f02290ccd9304f0e6bf8ee85f6e9106f02ac1f0
Date: 2026-07-23T21:41:07.333Z
Layout: IDE
Build Type: Stable
Release Track: Default
Electron: 40.10.3
Chromium: 144.0.7559.236
Node.js: 24.15.0
V8: 14.4.258.32-electron.0
xterm.js: 6.1.0-beta.256
OS: Windows_NT x64 10.0.26200
For AI issues: which model did you use?
Cursor Grok 4.5 High Fast
Additional Information
This process would be easier if you created a MCP server plugin so I can have AI create the defect for me.
Does this stop you from using Cursor
No - Cursor works, but with this issue
