How can I configure the location of Cursor-created worktrees?
It seems to place files under ~/.cursor/worktrees, which does not work for me in my current setup. Can I change this path?
Thanks!
How can I configure the location of Cursor-created worktrees?
It seems to place files under ~/.cursor/worktrees, which does not work for me in my current setup. Can I change this path?
Thanks!
Hey, unfortunately there’s currently no setting to change the base path for worktrees. Cursor uses a fixed path: ~/.cursor/worktrees.
The .cursor/worktrees.json file only lets you configure init scripts (installing dependencies, running migrations, etc.), not the storage path itself. More details in the docs: Parallel Agents | Cursor Docs
Can you describe what exactly isn’t working with the current path? There might be a workaround for your situation. Or if this is an important feature, it’s worth filing a feature request.
Thanks for the quick response!
I’m working in a remote setup where the /home mapping is a relatively slow network mount. So checking code out onto it and building it there is extremely slow.
But I figured out I can work around this by using a symlink. So currently no need for a feature request.
I’d like to change the worktree location too, since the current location trips up our current security tools. Each new worktree will trigger a new full virus scan, and given it’s a large mono repo, my computer will be bogged down until the scan is complete. This makes using parallel agents non light weight at the moment, thereby reducing their usefulness.
If I could change the default directory to be within our existing mono-repo, we have security mitigations to handle those worktrees seamlessly avoiding the slowdown.
I’d like worktrees to be on my Windows Dev Drive, which is more performant for code than where my home directory is located.
Hey, thanks for the feedback. Dev Drive is a great example of why a fixed path won’t work for everyone, plus the cases above with a network mount and AV scans.
Right now the path is still hardcoded to ~/.cursor/worktrees, and there’s no customization yet. We have a feature request logged for a configurable path and a setup script, but I can’t share an ETA.
Workarounds:
~/.cursor/worktrees → a folder on your Dev Drive like the OP did. This is the simplest option on Windowsmklink /J if a symlink doesn’t work due to permissionsIf you try it, let me know if it works well with Dev Drive. That signal helps.