My installation of Cursor decides it likes to forget all our past conversations over the weekend (can't blame it, we all need some R&R 😌).
This gist is intended as a rough guide in case you want to manually recover some past chats.
Use the query in the bubble_texts.sql file to grab past chat text.
Chats are stored in .vscdb files which are SQLite databases. The location of these files is:
- Windows:
%APPDATA%\Cursor\User\workspaceStorage - macOS:
~/Library/Application Support/Cursor/User/workspaceStorage - Linux:
~/.config/Cursor/User/workspaceStorage
Additionally, (at least on macOS), there's a globalStorage folder in the same level which directly contains a single db file (unlike the workspaceStorage, where they are organized in subfolders). This is the storage for chats initiated directly from the launcher (not associated with any specific workspace).
Note
It seems that in a recent update Cursor migrated away from storing chat level data in workspaceStorage/[hash]/state.vscdb, and instead threads are now kept in globalStorage/state.vscdb.
I did not have any luck with any of the recovery tools I tried:
- https://github.com/Ishkei/cursor-chat-recovery (did not even show the chats)
- https://github.com/thomas-pedersen/cursor-chat-browser?tab=readme-ov-file (showed the chats, but the contents were empty)
So I decided to do some spelunking inside the data myself.
You will need to open the DB (.vscdb) file to inspect the data. I used DB Browser for SQLite.
Each DB contains two tables. The chat data is contained in cursorDiskKV, with columns: key, value.
I didn't bother to attempt extracting more complex chat agentic data such as code edits or terminal usage, instead just looking at text content (both from the user and assistant). There are some UUIDs that are used to correlate text within the same conversation; the key includes a UUID that is shared across entries that are in the same chat.
For text content, the key format is like: bubbleId:<chat uuid>:<some other uuid>. The query above includes a condition to filter down to only include entries for a given chat UUID.
The value is a JSON with several fields, some interesting ones are listed below:
| Field | Description |
|---|---|
| text | The human‑readable content of that chat bubble |
| type | 1 for user message, 2 for assistant message |
| bubbleId | Allows you to order / group messages in the UI context |
| usageUuid | Links the message to a particular conversation session |
There is no timestamp info for user messages, so we rely on default table ordering which seems to give the correct chronological ordering. Assistant messages have timingInfo, which is included as a column in the output.
Once you have the query result containing the conversation text, export it to a PDF or CSV file. You can then refer to that file, or pass it into a new LLM conversation as a primer.