Tool to recover "disappeared" chats

A while ago I tried using a multi-root remote project and after restarting my machine all my Cursor chats for it vanished from the sidebar. After digging into globalStorage/state.vscdb I found they weren’t deleted at all: Cursor identifies each workspace by a hash of its folder URI, so moving or renaming a
project (or saving an Untitled multi-folder workspace as a .code-workspace file) mints a new workspace identity, and all prior chats stay keyed to the old one. The data is intact — it’s just orphaned. I wrote a small terminal UI to fix this for myself and figured it might help others:

What it does:

  • shows every chat across every workspace, including detached ones
  • moves chats to the right workspace (rewrites workspaceIdentifier, with a full DB backup first — and it refuses to write while Cursor is running)
  • exports chats to Markdown
  • has a --readonly mode if you just want to look

It’s reasonably fast on big databases — my own state.vscdb is 9.9 GB and the workspacelist loads in ~0.15s.

Install (Python 3.10+): uv tool install cursor-chat-recovery (or from git: uv tool install git+https://github.com/kwiscion/cursor-chat-recovery)

MIT licensed, 74 tests, backups before every write. If Cursor’s schema changes and breaksit, the tool detects that and falls back to read-only. Happy to answer questions or lookat edge cases — workspace identity has a few weird corners (remote workspaces, multi-root) and I’d like to handle them all.