Change project folder name without losing chats

Hi,

I was wondering if there’s a way to change the root folder name but retain all the Cursor chats associated to it.

I noticed that the chats are associated to the folder name. Moreover, if you delete a folder and in the future create a new one with the same name and path, Cursor will show the previous chats associated with that folder/path.

Is there some dot file somewhere that I can edit to customize this?

Thanks

I’ve seen a few posts about the workspaceStorage folder which allegedly contains all the chat data, but I can’t seem to change the path of any workspace…

I found a solution: How to move a Visual Studio Code workspace to a new location painlessly? - Stack Overflow

Bless this man.

I created a script that allows you to restore your chat history when the folder name is changed. You can try it.

https://github.com/SeLoRe/update_cursor_workspace_path

@SeLoRe This is amazing, thank you!

@SeLoRe thanks for this. It worked well for me today with latest Cursor version on a project on a Windows filesystem. Cursor should really have this as a native feature! Project folders get renamed all the time, especially as insight progresses at the speed of AI :person_running:

I had a similar issue. I wanted Cursor to stop using old data on a project I wanted to start over but did not want to start over with a new agent.

FIrst project was in one folder, I moved project to a new folder and deleted the old.

This caused Powershell and a few other grep commands to fail.
Fix below:

Fix Cursor when an agent is stuck on an old project folder

Suppose Cursor is still tied to:


C:\Path\To\Old Project Folder

but the real project now lives at:


C:\Path\To\New Project Folder

The clean workaround is to replace the old folder path with a junction that points to the new folder. Cursor can keep using the old path, but all reads and writes go to the new project.

First, rename the old folder so nothing is lost:


ren "C:\Path\To\Old Project Folder" "Old Project Folder BACKUP"

Then create the junction from PowerShell:


cmd /c mklink /J "C:\Path\To\Old Project Folder" "C:\Path\To\New Project Folder"

Expected result:


Junction created for C:\Path\To\Old Project Folder <<===>> C:\Path\To\New Project Folder

Verify it:


Get-Item "C:\Path\To\Old Project Folder" | Format-List FullName,LinkType,Target

You should see:


LinkType : Junction
Target   : {C:\Path\To\New Project Folder}

After that, reopen Cursor using the old path. The agent should continue working normally, while the actual files remain in the new folder.

Once you confirm everything works, the renamed backup can be removed:


Remove-Item "C:\Path\To\Old Project Folder BACKUP" -Recurse -Force

To remove only the junction later without deleting the real project:


cmd /c rmdir "C:\Path\To\Old Project Folder"

Important: create the junction only after the original old-path folder has been renamed or removed. A junction cannot be created where a normal folder already exists.