Worktrees Setup not working in WSL

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

The Worktrees Setup feature doesn’t work when Cursor is running inside WSL.
When I start an agent chat in Worktree mode within WSL, the setup process fails to find the configuration file even though it exists.

In the IDE logs, I see this:

[worktree-setup] checking config
{"composerId":"36f27267-93fa-4616-85c9-47e238febff6","worktreePath":"/home/erickluis00/.cursor/worktrees/acessopro__WSL__ubuntu-22.04_/1W1Q0","rootWorkspacePath":"\\home\\erickluis00\\ubuntu-projects\\acessopro","worktreeConfigFile":"file:///home/erickluis00/.cursor/worktrees/acessopro__WSL__ubuntu-22.04_/1W1Q0/.cursor/worktrees.json","rootConfigFile":"file:///home/erickluis00/ubuntu-projects/acessopro/.cursor/worktrees.json","isTargetWindows":false,"remoteOS":3}
[worktree-setup] no config file found in worktree or root, skipping

It seems like Cursor is not correctly resolving WSL paths.

When running the same setup outside WSL, everything works perfectly.

Steps to Reproduce

  1. Open Cursor IDE connected to a WSL distro (e.g., Ubuntu 22.04).
  2. Create or open a project inside WSL (e.g., /home/user/project).
  3. Add a .cursor/worktrees.json file in the project directory.
  4. Start a new chat in Worktree mode.
  5. Open the “Worktrees Setup” logs.

Result:
You’ll see no config file found in worktree or root, skipping.

Expected Behavior

The Worktrees Setup should detect and load .cursor/worktrees.json correctly even when running inside WSL, just like it does on Windows folders.

Screenshots / Screen Recordings

Operating System

Windows 10/11

Current Cursor Version (Menu → About Cursor → Copy)

Version: 2.0.40 (user setup)
VSCode Version: 1.99.3
Commit: a9b73428ca6aeb2d24623da2841a271543735560
Date: 2025-10-30T04:12:35.564Z
Electron: 34.5.8
Chromium: 132.0.6834.210
Node.js: 20.19.1
V8: 13.2.152.41-electron.0
OS: Windows_NT x64 10.0.26100

Additional Information

Worktrees Setup Logs

[2025-10-30T19:10:11.636Z] [worktree-setup] checking config
{"composerId":"36f27267-93fa-4616-85c9-47e238febff6","worktreePath":"/home/erickluis00/.cursor/worktrees/acessopro__WSL__ubuntu-22.04_/1W1Q0","rootWorkspacePath":"\\home\\erickluis00\\ubuntu-projects\\acessopro","worktreeConfigFile":"file:///home/erickluis00/.cursor/worktrees/acessopro__WSL__ubuntu-22.04_/1W1Q0/.cursor/worktrees.json","rootConfigFile":"file:///home/erickluis00/ubuntu-projects/acessopro/.cursor/worktrees.json","isTargetWindows":false,"remoteOS":3}
[2025-10-30T19:10:11.645Z] [worktree-setup] no config file found in worktree or root, skipping

Does this stop you from using Cursor

No - Cursor works, but with this issue

1 Like

I also use devcontainer and am experiencing the same situation.

1 Like

Hey, thanks for the report. It looks like your config file is correct, but the logs show rootWorkspacePath using Windows-style backslashes (\\home\\erickluis00\\ubuntu-projects\\acessopro) instead of Unix forward slashes. That’s why the config file lookup fails.

This seems to be a bug in how Cursor handles path resolution in WSL environments. I’ll pass this to the team along with your logs and repro steps.

Hi @deanrie, there is Any updates on this case? Any workaround or status on the fix?