Skip to content

Cursor cannot edit Windows (D:\) and WSL (/home/ta/) source trees in one reliable multi-root workspace. Use two workspace files in two Cursor windows (same app — not mixed UNC paths).


I want to…Do this
Edit KB or backup scriptsWindows workspace
Edit monorepo / Linux projectsWSL workspace
Use Claude Code in a workspace project + see its filesRight-click on Workspace root, in Cursor’s Explorer left sidebar → Open in Integrated Terminalclaude
Move CC terminal to a second monitorMove Terminal into Editor AreaMove into New Window → drag to monitor 2; Ctrl+J hides panel on main display
Run bash/git against D:\FSSWSL terminal inside Windows workspace; paths /mnt/d/FSS/...
Open a single Linux repo onlycd ~/projects/monorepo && cursor . (still WSL remote)
WindowWorkspace fileFilesystemStatus bar
WindowsD:\FSS\fss-windows.code-workspaceNative D:\No WSL badge
Linux/home/ta/linux-wsl.code-workspaceNative WSL ext4WSL: Ubuntu-24.04

Do not open WSL folders via \\wsl$\Ubuntu-24.04\... in a Windows workspace. That triggers the slow/broken UNC bridge and the startup warning dialog.

WSL extension does not auto-connect. It is installed, but remote mode starts only when you open a workspace from WSL (or run WSL: Connect to WSL). There is no setting to connect WSL automatically while editing D:\FSS.

Hybrid that already works: In the Windows window, the integrated terminal defaults to WSL (Ubuntu-Cursor (WSL)). You can run Linux commands against Windows files via /mnt/d/FSS/... without putting WSL projects on UNC paths.

Windows — fss-windows.code-workspace

  • KB — Tasks (KB/Core/_WorkingOn)
  • KB — MBR
  • KB — Core
  • KB — Root
  • Backup Util (Software/Utils/PythonUtils/my_backup)

WSL — linux-wsl.code-workspace (lives in /home/ta/, not on D:\)

  • Monorepo
  • MBR (Linux)
  • Asset History
  • Utils — AI, Shell, System, Web

Windows workspace — from PowerShell, Run dialog, or double-click D:\FSS\open-windows-workspace.bat:

Terminal window
cursor D:\FSS\fss-windows.code-workspace

WSL workspace — from Windows (desktop shortcut or batch file; opens WSL remote directly):

Terminal window
cursor -n --remote wsl+Ubuntu-24.04 /home/ta/linux-wsl.code-workspace

Or double-click D:\FSS\open-linux-workspace.bat / Cursor - WSL (Linux) on the desktop.

Do not use wsl.exe ... cursor ~/linux-wsl.code-workspace from a Windows shortcut — that opens the Windows welcome screen and leaves you to pick the workspace from Recents manually.

From Ubuntu terminal (inside WSL, this path is correct):

Terminal window
cursor ~/linux-wsl.code-workspace

Fallback from an already-open Windows Cursor window:

  1. Ctrl+Shift+PWSL: Connect to WSL (or WSL: Connect to WSL using Distro… → Ubuntu-24.04)
  2. File → Open Workspace from File…/home/ta/linux-wsl.code-workspace

Confirm bottom-left shows WSL: Ubuntu-24.04 before doing Linux project work.

Add/remove Windows folders

  1. Open D:\FSS\fss-windows.code-workspace in Cursor (Windows window).
  2. File → Add Folder to Workspace… or right-click a root in Explorer → Remove.
  3. File → Save Workspace As… (overwrite fss-windows.code-workspace) — or edit the JSON directly. Use paths relative to D:\FSS (e.g. KB/Core) or absolute D:\... paths.

Add/remove WSL folders

  1. Open WSL workspace from Ubuntu: cursor ~/linux-wsl.code-workspace.
  2. Add/remove folders the same way; save workspace.
  3. Edit JSON with paths relative to /home/ta/ (e.g. projects/monorepo). Never use \\wsl$\... in this file.

Switch workspace in current window

  • File → Open Workspace from File… and pick the other .code-workspace file.
  • Prefer File → New Window first (window.openFoldersInNewWindow: on) so you keep both contexts open.

In File → Preferences → Settings → Open Settings (JSON):

"window.restoreWindows": "all",
"window.openFoldersInNewWindow": "on"
  • "all" — reopen both Windows and WSL windows after restart (if both were open when you quit).
  • "on" — opening the second workspace does not replace the first.

With window.restoreWindows: "all", a normal quit (File → Exit, or close the last window) should restore each window that was still open when you quit:

  • Workspace folders (multi-root roots in each .code-workspace)
  • Open editor tabs and cursor position in those files

Both windows must be open when you quit for both to come back. If you close only the WSL window and leave the Windows window running, only the Windows session is saved for next time.

WindowRestore on restart?
Windows (fss-windows)Usually reliable
WSL (linux-wsl)Less reliable — WSL remote must reconnect; use the desktop shortcut or open-linux-workspace.bat if it does not return

Normal quit vs. abnormal exit: force-kill or a crash may lose unsaved work and give partial or no restore.

Two windows, one app: restore brings back separate windows (Windows vs WSL context), not two independent Cursor installs.

  • Close any workspace still using dev.code-workspace or \\wsl$\... paths.
  • Open Windows workspace: cursor D:\FSS\fss-windows.code-workspace (or run open-windows-workspace.bat).
  • In Ubuntu: cursor ~/linux-wsl.code-workspace.
  • Verify WSL window status bar: WSL: Ubuntu-24.04.
  • Verify Windows window status bar: no WSL badge.
  • Add window.restoreWindows and window.openFoldersInNewWindow to user settings (above).
  • Stop using deleted dev.code-workspace (mixed OS — removed).
  • Desktop shortcuts: Cursor - Windows (FSS).lnk, Cursor - WSL (Linux).lnk (see Launcher files).

From Ubuntu:

Terminal window
which cursor

If missing: in Windows Cursor, Ctrl+Shift+PShell Command: Install ‘cursor’ command in PATH (install in WSL if offered), then retry.

Default distro (if needed):

Terminal window
wsl --set-default Ubuntu-24.04

  1. Start Windows workspace (often auto-restores).
  2. Start WSL window: desktop shortcut Cursor - WSL (Linux) or open-linux-workspace.bat (uses --remote wsl+...).
  3. Use Alt+Tab between two Cursor windows — same process, correct remote context per window.

Goal: Claude Code in the terminal and the Explorer sidebar show the same project.

Why tmux broke this: Auto-tmux in .bashrc hijacked every Cursor terminal into the shared work session with pre-set cd paths — independent of which workspace root you clicked in Explorer.

Fix (in place):

  • Cursor integrated terminals skip auto-tmux (TERM_PROGRAM=vscode check in .bashrc).
  • Each workspace root has .vscode/settings.json with terminal.integrated.cwd: "${workspaceFolder}".

Do not use ${fileWorkspaceFolder} at workspace level — it requires a file open in the editor and errors with “Variable ${fileWorkspaceFolder} can not be resolved” when only Explorer is focused.

Workflow — switch CC project and see matching files:

Method A (fastest — no file needs to be open):

  1. In Explorer, right-click the workspace root (e.g. Utils — AI).
  2. Open in Integrated Terminal.
  3. Run claude — terminal cwd and Explorer tree both match that root.

Method B (keyboard-first):

  1. Open any file from the target root (e.g. pyproject.toml under Utils — AI).
  2. Terminal → New Terminal (Ctrl+Shift+`` ) — cwd follows the open file’s workspace root.
  3. Run claude.

Method C (no file open, keyboard only):

  1. Terminal → New Terminal (Ctrl+Shift+`` ).
  2. Pick the project from the “Select current working directory” picker (multi-root default).
  3. Run claude.

Switch projects: repeat with a new terminal tab (or kill the old CC session first).

tmux still available in Windows Terminal and other external shells (not inside Cursor).

KB / Windows-path CC work (e.g. /mnt/d/FSS/KB/...): use the Windows workspace window with a WSL bash terminal (not PowerShell). Right-click workspace root → Open in Integrated Terminal should open Ubuntu-Cursor (WSL) at /mnt/d/FSS/KB/...claude.

Goal: Main display = Explorer (left) + open files (center) + Agents (right). Second display = CC terminal only.

Detach integrated terminal to another monitor:

  1. Right-click the wsl terminal tab (bottom panel) → Move Terminal into Editor Area
    (or Ctrl+Shift+PTerminal: Move Terminal into Editor Area).
  2. Right-click the terminal tab in the editor area → Move into New Window
    (or drag the tab off the Cursor window onto the second monitor).
  3. Maximize/resize on monitor 2. On the main window, hide the bottom panel: Ctrl+J.

Optional setting (new terminals start as editor tabs — easier to detach):

"terminal.integrated.defaultLocation": "editor"

Alternative: Run CC in Windows Terminal on monitor 2 (wsl -d Ubuntu-24.04, cd to project, claude). Same WSL environment; Explorer sync is manual.

Detached terminal windows may not restore on restart — repeat detach or leave the second window open when quitting (window.restoreWindows: all).

  • One multi-root workspace mixing D:\ and \\wsl$\....
  • Opening linux-wsl.code-workspace by browsing \\wsl$\ in Windows Explorer.
  • Maintaining the same repo in both D:\FSS\KB\MBR and ~/projects/mbr without a deliberate sync strategy.
Windows pathWSL equivalent
D:\FSS/mnt/d/FSS
D:\FSS\KB/mnt/d/FSS/KB
SymptomFix
WSL warning on startupA folder is still on \\wsl$\...; use split workspaces only.
Slow save / watch / git in Linux projectNot in WSL remote — reconnect via cursor ~/linux-wsl.code-workspace.
Wrong Python/node versionCheck status bar context; extensions run in the window’s remote (Windows vs WSL).
cursor not found in WSLInstall shell command from Cursor command palette (see above).
Terminal opens pwsh instead of bash for KBDefault profile missing — use Ubuntu-Cursor (WSL) from terminal dropdown; profile is defined in user settings.json.
Ubuntu-24.04 (WSL) fails (bash.exe -d exit code 2)Auto-detected profile is broken — pick Ubuntu-Cursor (WSL) instead (uses wsl.exe -d Ubuntu-24.04). Reload window after settings change.
  • Windows: D:\FSS\open-windows-workspace.bat
  • WSL (from Windows): D:\FSS\open-linux-workspace.bat
  • WSL (from Ubuntu): ~/open-linux-workspace.sh (optional alias in ~/.bashrc)
  • Desktop shortcuts: C:\Users\Admin\Desktop\Cursor - Windows (FSS).lnk, Cursor - WSL (Linux).lnk
Terminal window
alias cursor-win='cursor.exe D:/FSS/fss-windows.code-workspace'
alias cursor-linux='cursor ~/linux-wsl.code-workspace'