WSL: Quick Open creates files with incorrect path separators when using nested paths

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

When using Cursor with WSL, creating a new file via Quick Open (Ctrl + P) with a nested path incorrectly handles path separators. If a path such as my/new/file.tsx is entered and Cursor offers to create the file, the resulting file is created as a single filename using Windows-style backslashes (my\new\file.tsx) instead of creating the expected directory structure (my/new/file.tsx). This behavior only occurs when the file does not already exist and is specific to Cursor running in a WSL environment.

Steps to Reproduce

  1. Open Cursor connected to a project running under WSL.
  2. Press Ctrl + P to open Quick Open.
  3. Type a nested file path that does not exist, for example:
    my/new/file.tsx
  4. Select “Create File ‘my/new/file.tsx’”.
  5. Observe that Cursor creates a file named my\new\file.tsx instead of creating directories my/new/ and a file file.tsx inside them.

Expected Behavior

When creating a new file via Quick Open using a nested path (e.g., my/new/file.tsx), Cursor should create the required directories and the file using POSIX path separators under WSL, resulting in my/new/file.tsx.

Screenshots / Screen Recordings

Operating System

Windows 10/11

Current Cursor Version (Menu → About Cursor → Copy)

Version: 2.2.20 (system setup)
VSCode Version: 1.105.1
Commit: b3573281c4775bfc6bba466bf6563d3d498d1070
Date: 2025-12-12T06:29:26.017Z
Electron: 37.7.0
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Windows_NT x64 10.0.26100

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey, thanks for the report. The issue with Windows backslashes instead of POSIX forward slashes when creating files via Quick Open in WSL is a classic path handling bug between Windows and Linux.

On version 2.2.20, the screenshot shows Cursor suggesting my\new\file.tsx instead of the proper directory structure my/new/file.tsx.

This isn’t the first report about WSL path separator issues. There are similar bugs in shell integration and interpreter mode, all related to Cursor sometimes using Windows path logic in a WSL environment.

For now, please try:

  • Create nested files via the terminal: mkdir -p my/new && cursor my/new/file.tsx
  • Or create directories first in File Explorer, then the file via Quick Open
  • Use Ctrl+N for a new file, then Ctrl+S Save As with the full path

I’ll pass this to the team. This looks like a path normalization bug in the WSL context.

Certainly. I’m well aware what the root cause is. My follow-up questions would be…

  • Cursor is forked from VSCode, which has a very polished WSL story. Why doesn’t Cursor? Why is Cursor not leaning on the battle-tested environment handling and path resolution that VSCode has already established?
  • The WSL and devcontainer bugs are really starting to pile up. Is there any official statement from the Cursor crew on where improved WSL support falls on the roadmap and list of priorities?
  • With Cursor in its current state, I’m at the point where I’m going to try uninstalling Cursor from the Windows host and reinstall directly within the WSL environment as a Linux GUI app. This is atypical, but should in theory resolve many of the bugs I’ve ran into. Are you aware of any pitfalls here? Do you agree with my assessment?

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