I have a monorepo with many different projects in child folders. The projects work best in most of cursor tooling when opening the child folders in a cursor window rather than opening the whole monorepo folder. Using multiple agents (or any workflow that uses worktrees) doesn’t work correctly in this scenario. Clicking “Apply” on a parallel agent’s work fails to apply it. The error popup says it’s looking in the wrong place to apply the work though it was created in the correct place. Apply is looking in child_folder/.git/worktrees… rather than monorepo/.git/worktrees.
Hey, thanks for the report. When you open a subfolder of a git repo instead of the repo root, Cursor resolves the .git/worktrees path relative to the opened folder, not the actual repo root. The team is aware, and your report helps us prioritize it.
As a temporary workaround, you have two options:
Open the monorepo root folder in Cursor instead of the child folder when you use parallel agents.
Apply changes from the worktree manually using git commands in the terminal. You can get the worktree paths with git worktree list, then do a cherry-pick or merge from there.
Also, can you share the exact error text from the popup? That’ll help with tracking.
Yup, The first workaround works, but the second only partially works:
My monorepo is larger than the context window for most models so 1 works but not well, so I’d rather not do that.
Cursor’s agent worktrees seem not to be interpoerable with the native worktree implementation - they don’t show up in the panel and are quite awkward to apply with git commands from their nonstandard location, which ends up outside the repo in ~/.cursor/worktrees…
An example of the error text I see is:
```
Failed to apply worktree to current branch: Unable to read file ‘/Users/orvisevans/.cursor/worktrees/admin-portal/yij/src/components/OrderableList/OrderableListContext.tsx’ (Error: Unable to resolve nonexistent file ‘/Users/orvisevans/.cursor/worktrees/admin-portal/yij/src/components/OrderableList/OrderableListContext.tsx’)
```