Parallel agents do not properly merge back changes when working on subfolders of git repo

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Parallel agents fail to merge their changes to the main branch if cursor was opened in a subfolder (not the root) of the git repo.

Steps to Reproduce

Create a git repo, subfolder client, file readme.md with contents “Hello World”.
`mkdir parallel_agent_subfolder_merge
cd parallel_agent_subfolder_merge
git init

mkdir client

echo Hello World> client\Readme.md

git add client\Readme.md
git commit -m “Add client Readme.md with Hello World”

git status`

Open project in Cursor and select the “/client” subfolder.
Start an agent, switch from “Local” to “Worktree”. Ask it to add an exclamation mark to the “Hello World” in “readme.md”.
It properly adds it. Review and it shows you it modified the file.
Now click “Apply” and Cursor complains about merge conflicts. Selecting overwrite and it creates a new “/client/client/readme.md”.

Expected Behavior

Agent properly merges changes to “/client/readme.md”.

Screenshots / Screen Recordings

Operating System

Windows 10/11

Version Information

Version: 2.4.22 (user setup)
VSCode Version: 1.105.1
Commit: 618c607a249dd7fd2ffc662c6531143833bebd40
Date: 2026-01-26T22:51:47.692Z
Build Type: Stable
Release Track: Default
Electron: 39.2.7
Chromium: 142.0.7444.235
Node.js: 22.21.1
V8: 14.2.231.21-electron.0
OS: Windows_NT x64 10.0.26200

For AI issues: which model did you use?

n/a

For AI issues: add Request ID with privacy disabled

n/a

Does this stop you from using Cursor

Sometimes - I can sometimes use Cursor

Hey, thanks for the detailed report. I can see the issue in your screenshot: git status shows client/client/ as untracked, even though the review panel correctly showed the change in Readme.md.

This is a known issue with path resolution in worktree mode. A similar thread came up here: 🐛 Bug Report: Path Resolution Inconsistency in Git Worktree Mode

The bug is that the agent resolves paths incorrectly when Cursor is opened in a subfolder of the git repo, not at the root. The team is aware and it’s been logged.

Workaround: Open the project at the git root level parallel_agent_subfolder_merge, not at the client level. That should help avoid duplicated paths.

Can you share the Request ID from the agent chat where you applied the changes? (Chat menu in the top-right → Copy Request ID.) This will help the team link your case to the bug.

Absolutely,

f62c1627-fa0b-49c2-99e7-1690712a39d4

Thank you for your efforts!

This topic was automatically closed 22 days after the last reply. New replies are no longer allowed.