pathThe path URL is strange

When editing using the AI ​​chat function, when suggesting a path link like
new_customer.html, it moves to the normal file location,

but when pressing the Apply button directly to the code like Accept,
it keeps moving to \ like the Wdinwos path.

/root/pos_system/templates/new_customer.html

\root\pos_system\templates\new_customer.html

Why is this happening?

path

Hey, do the AI changes get applied successfully or does it fail because of this?

You are trying to create a new path that does not exist and writing the generated code. The original file will not be affected.

I get the same. I posted twice about this with no reponse. Cannot apply any changes because Cursor is incorrectly handling path in windows.

It’s ignoring the drive of the file path I’m editing, for C:\Users\User\repo1\file1.txt

it will try to apply to change to \Users\User\repo1\file1.txt…

Thanks for the additional details - this definitely sounds like a Windows path handling bug. Could you try starting a fresh Cursor instance by fully closing it (including from the system tray) and reopening? This should reset the AI composer which is likely getting confused with the path formats

If that doesn’t help, we’ll need to get this properly logged as a bug. Could you share what version of Cursor you’re running? You can find this in Settings > About

This is not a recent bug, previous version of Cursor also had it.

Version: 0.45.15 (user setup)
VSCode Version: 1.96.2
Commit: 73dd83bb6f8e3a3704ad8078a8e455ac6d4260d0
Date: 2025-02-22T10:19:07.356Z (1 day ago)
Electron: 32.2.6
Chromium: 128.0.6613.186
Node.js: 20.18.1
V8: 12.8.374.38-electron.0
OS: Windows_NT x64 10.0.19045

This is also happening in the Chat, not only the Composer.

I’ve been able to get rid of the bug by reinstalling Cursor. It is now happening again and reinstalling doesn’t do the trick anymore.

Once it happens, even after restarting. The chatbox doesn’t show added file to the context on the top of the chat like it normally do.

and the file with the malformed path (without the drive) is showing as an available file to add to the context.

I found one way to replicate the issue. It has to do with spaces in filename. @danperks

If one space is present in a filename you want to edit. The file won’t be shown as added to the context in the chat window BUT you will still able to apply any changes to it.

If two spaces are present, not only you won’t see the added file (to the context), you also won’t be able to apply any changes from the LLM (my example in the screenshot above is this scenario.

Hey, 0.46 has got some significant changes here, so when that version makes its way to you, give that a test and let me know! If there’s still issues, I’ll flag to the team!

Just happened to me in 0.46.8.
image

Cursor tried to apply the changes to the file path without the C:\ drive.
No spaces in the file path this time though.