Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
During AI coding sessions, agent edits are sometimes written to a Cursor worktree path instead of the canonical project path that the user is actively using in file browser, git, and terminal workflows.
This causes silent divergence between two trees:
- Canonical repo path (user’s expected source of truth)
- Cursor worktree path (where some agent edits are actually applied)
Result: expected edits appear “missing” in the canonical repo, while unrelated/large diffs appear when manually syncing trees. This is especially risky for production migration work.
Steps to Reproduce
- Open a canonical project folder in Cursor (example:
/Users/xxxx/Dev/code/xyz). - Start an agent session and perform multiple code edits.
- Continue normal workflow from canonical repo using terminal/git/file browser.
- At some point, observe that agent-edited files exist/changed under a Cursor worktree path instead (example:
/Users/xxx/.cursor/worktrees/...) and not in canonical path. - Compare both trees (
git rev-parse,git status,diff -qr) and observe divergence.
Observed in incident:
- Canonical HEAD and worktree HEAD are different.
- Worktree contains edits/untracked files not present in canonical tree.
- Canonical contains files/state not present in worktree.
NOTE:
- I am not using git worktrees explicitly, or doing anything complicated with multi-agents. My workflow is single edit line on a few local scripts in single project.
- This seems to happen when using Agent / Auto mode, not 100% certain but have been using this most recently when has happened a few times
- Repo is hard as it happens silently and only becomes apparent when running script reveals expected functions are lost. Sometimes when testing different functions this doesn’t become apparent for hours. It may related to pauses in work or silent agent changes but hard to say.
Expected Behavior
- Agent should write only to the currently active canonical workspace root unless explicitly approved otherwise.
- If Cursor changes effective write root (for example to a worktree), Cursor should require explicit confirmation before writes.
- Write root should be prominently visible at all times during agent operations.
- Cursor should not rely on implicit/manual syncing after writes have already diverged.
Basically I should be able to trust basic edit functions
Operating System
MacOS
Version Information
Version: 2.5.26 (Universal)
VSCode Version: 1.105.1
Commit: 7d96c2a03bb088ad367615e9da1a3fe20fbbc6a0
Date: 2026-02-26T04:57:56.825Z
Build Type: Stable
Release Track: Default
Electron: 39.4.0
Chromium: 142.0.7444.265
Node.js: 22.22.0
V8: 14.2.231.22-electron.0
OS: Darwin arm64 24.6.0
Additional Information
This bug effectively makes Cursor unusable for me. I’ve had critical projects delayed due to having to scramble to unpick lost edits etc. I can’t understand how it can be so unstable, or why the Cursor team are pushing more complexity into the IDE when things like this happen.
I will move to using Claude CLI out of preference as never had this experience there.
Does this stop you from using Cursor
Yes - Cursor is unusable


