You spent an afternoon iterating in Composer, closed Cursor, reopened it the next morning, and the conversation list is empty. Or only today’s thread is there and yesterday’s deep dive vanished. Sometimes it is a single window reload that does it, not even a full quit. Chat history in Cursor lives in a local SQLite database under your user data directory; when it goes missing, the cause is almost always one of: workspace-scoped storage and you opened a different folder, the SQLite file got corrupted by a hard kill, an account sync moved threads to the cloud unevenly, or the cleanup job silently pruned old conversations to manage disk. Recovery is partial in some cases, full in others — and prevention is cheap.
Common causes
Ordered by hit rate, highest first.
1. Composer history is workspace-scoped and you opened a different folder
Composer conversations are tied to the workspace where they were created. If you opened a sibling folder or a different worktree, the previous workspace’s history is invisible — not deleted, just out of scope.
How to judge: File → Open Recent → switch back to the original folder. If the threads reappear, this is it.
2. SQLite history file got corrupted
A hard kill (force quit while Composer was mid-write) can leave the SQLite WAL in a state Cursor cannot recover. On next launch the IDE creates a fresh DB rather than fail to open.
How to judge: Check ~/Library/Application Support/Cursor/User/workspaceStorage/<hash>/state.vscdb (macOS) for state.vscdb-shm or state.vscdb-wal files lingering. Existence of a .backup file is also a strong signal.
3. Account sync silently moved threads
Cursor’s “Sync chat history” setting moves threads between devices. A bad sync round can pull a thread from a different machine and mask local threads.
How to judge: Settings → Account → Sync chat history. Toggle off, restart, check if local threads come back. Toggle on once recovered.
4. You hit the local history retention cap
Cursor caps stored conversations per workspace (around 100-200 in recent versions). Old threads get pruned silently when you cross the cap.
How to judge: Count your current threads. If it is exactly at the cap and only the oldest are missing, this is it.
5. You opened the project from a different absolute path
Composer keys storage by workspace hash, and the hash includes the absolute path. Symlink, network drive remount, or a ~/Projects → /Users/you/Projects change creates a new hash and a fresh empty history.
How to judge: Compare the path in the title bar today vs yesterday. Any difference, even cosmetic, splits the storage.
6. A Cursor update migrated storage and skipped some threads
Occasionally a version bump migrates the storage schema and stragglers do not survive. Rare, but it happens on major releases.
How to judge: Help → About to see the version. Check the Cursor changelog for a “storage migration” note.
Before you start
- Do not start a new conversation in the empty Composer — it can write over recoverable backups.
- Identify the exact workspace path where the missing history lived.
- Quit Cursor fully before poking at the storage files; live writes can corrupt your recovery attempt.
Information to collect
- Cursor version (Help → About).
- OS and user data directory path.
- Exact workspace path (today’s vs the one where the history was created).
- Whether “Sync chat history” is on.
- Files present under
~/Library/Application Support/Cursor/User/workspaceStorage/(Linux:~/.config/Cursor/User/..., Windows:%APPDATA%\Cursor\User\...). - Approximate count and date of missing threads.
Step-by-step fix
Step 1: Re-open the original workspace
File → Open Recent. Pick the project at its original path, exactly. If history returns, you were in a different workspace. Bookmark the canonical path going forward.
Step 2: Toggle sync to refetch from cloud
Settings → Account → Sync chat history → off, restart, on, restart again. This forces a fresh pull. Missing threads stored in cloud should reappear; ones that never synced will not.
Step 3: Inspect workspaceStorage on disk
Quit Cursor. List the directories:
ls -la ~/Library/Application\ Support/Cursor/User/workspaceStorage/
Each subdirectory is a workspace hash. The one for your project will contain state.vscdb. Files larger than a few KB usually have data; near-zero means empty.
Step 4: Restore from a backup file
If you see state.vscdb.backup or state.vscdb-corrupted, copy the current state.vscdb aside (just in case), then rename the backup to state.vscdb and restart Cursor:
cd ~/Library/Application\ Support/Cursor/User/workspaceStorage/<hash>/
cp state.vscdb state.vscdb.broken
mv state.vscdb.backup state.vscdb
Step 5: Open the SQLite DB and inspect
If no backup exists, the DB itself may still have rows. With Cursor quit:
sqlite3 state.vscdb "SELECT key FROM ItemTable WHERE key LIKE '%composer%' OR key LIKE '%chat%';"
Any matching keys mean data is there; export the values to JSON, then start Cursor and check if it picked them up.
Step 6: Check the global storage too
Some chat metadata lives in ~/Library/Application Support/Cursor/User/globalStorage/. Look for cursor.aichat.* directories. Renaming a stale one out of the way and restarting can force Cursor to rebuild from a healthier source.
Step 7: As a last resort, file a support ticket
If the data was on a Pro account with sync on, Cursor support can sometimes restore from cloud snapshots. Include version, workspace path, approximate dates, and the file sizes from Step 3.
Verify
- Open the recovered workspace and confirm thread titles match what you remember.
- Click into an old thread and check the conversation is intact, not truncated.
- Restart Cursor once and confirm history survives the restart.
- Toggle Sync off and on again with no thread loss.
Long-term prevention
- Always quit Cursor with Cmd+Q (macOS) or File → Exit; do not force-kill if you can avoid it.
- Keep “Sync chat history” on if you work across devices; it is your remote backup.
- Use stable absolute paths for projects. Avoid moving the folder once it has Composer history.
- For irreplaceable conversations, export them: click the thread → Export → save as Markdown.
- Periodically back up
~/Library/Application Support/Cursor/User/workspaceStorage/with Time Machine or rsync.
Common pitfalls
- Starting a new chat in the empty window before checking the workspace path. New writes can over-write backups.
- Editing the SQLite DB while Cursor is open. Always quit first.
- Trusting the cloud sync to have everything. It syncs going forward; threads that predate the toggle may not be uploaded.
- Renaming a project folder mid-session. The workspace hash changes and your active thread vanishes from the sidebar.
- Assuming “Reload Window” is harmless. It can re-init state and surface a stale storage path.
FAQ
- Where exactly does Cursor store chat history? macOS:
~/Library/Application Support/Cursor/User/workspaceStorage/<hash>/state.vscdb. Linux and Windows mirror that under their per-user app dirs. - Is it synced to my Cursor account? Only if you turned on “Sync chat history.” Even then, large conversations may be deferred or capped.
- Can I export a single conversation? Yes — open the thread, click the three-dot menu, choose Export.
- Does opening the same project via symlink share history with the real path? No. The workspace hash differs, so they are separate stores.
- What does the retention cap look like? Around 100-200 threads per workspace in 0.46. Heavy users should export important ones.