Cursor
Where Cursor stores your chat and agent history
Cursor keeps agent and chat history in a SQLite database, state.vscdb. Where it is on macOS, Windows and Linux, how to read a copy, and how to clear it.
Updated October 29, 2026 // Markdown
- Made by
- Anysphere
- History lives in
- macOS
~/Library/Application Support/Cursor/User/globalStorage/state.vscdb - Windows
%APPDATA%\Cursor\User\globalStorage\state.vscdb - Linux
~/.config/Cursor/User/globalStorage/state.vscdb - CLI agent
~/.cursor/chats/<workspace-hash>/<chat-id>/
- macOS
- Format
- SQLite (table cursorDiskKV, JSON values)
- Kept for
- No automatic pruning
- Resume
agent resume, agent --continue (CLI)- Cloud copy
- Chats are local and not part of Settings Sync; shared transcripts and Cloud Agents are uploaded
Cursor is a VS Code fork, and it stores agent and chat history the way VS Code stores state: in a SQLite database, not in readable files.
Where the database is
| System | Path |
|---|---|
| macOS | ~/Library/Application Support/Cursor/User/globalStorage/state.vscdb |
| Windows | %APPDATA%\Cursor\User\globalStorage\state.vscdb |
| Linux | ~/.config/Cursor/User/globalStorage/state.vscdb |
Next to it sit state.vscdb-wal and state.vscdb-shm, SQLite's write-ahead files. Each workspace has another state.vscdb under workspaceStorage/<hash>/.
Cursor's documentation does not cover any of this. The paths come from Cursor staff answers on its forum, and match what we see on a Mac.
What is inside
Conversations live in the cursorDiskKV table as JSON values:
| Key prefix | What it holds |
|---|---|
composerData:<id> |
One conversation: id, created time, status, whether it was agentic, token count |
bubbleId:<composerId>:<bubbleId> |
One message: type, text, tool results, thinking blocks |
messageRequestContext: |
Context sent with a request |
agentKv:blob: |
Agent state |
To look, copy the database while Cursor is closed and open the copy:
cp ~/Library/Application\ Support/Cursor/User/globalStorage/state.vscdb /tmp/cursor.db
sqlite3 /tmp/cursor.db "select count(*) from cursorDiskKV where key like 'composerData:%';"
Never write to the live database.
The Cursor CLI
The terminal agent, agent, keeps its chats separately, under ~/.cursor/chats/<workspace-hash>/<chat-id>/.
agent ls # list chats
agent resume # pick one
agent --continue # the latest
agent --resume <chatId>
Clear history
Cursor does not prune chats on its own. To clean up, open the command palette and run:
- Developer: Delete Old Chats…
- Developer: GC Agent KV Blobs
- Quit Cursor fully, so the database can shrink.
Deleting a chat is permanent.
Privacy notes
- Chat history stays on your machine and is not part of Settings Sync.
- Transcripts you share (Teams and Enterprise) and Cloud Agent runs are stored by Cursor.
- The database holds code and output the agent saw. Redact before sharing.
The groundedby evaluator does not read Cursor's database yet.
Questions
Where are Cursor chats saved?+
In a SQLite database called state.vscdb in Cursor's globalStorage folder - on a Mac, ~/Library/Application Support/Cursor/User/globalStorage/state.vscdb. Each workspace also has its own state.vscdb under workspaceStorage. Cursor's docs do not describe this; the location comes from Cursor staff on its forum.
Does Cursor sync chat history between computers?+
No. Chat history is local and not covered by Settings Sync. Transcripts you share on Teams or Enterprise plans, and Cloud Agent runs, are stored by Cursor.
How do I clear Cursor's chat history?+
Use the command palette - "Developer - Delete Old Chats", then "Developer - GC Agent KV Blobs" - and fully quit Cursor so the database shrinks. Deleting a chat is permanent.
Can I read the database myself?+
Yes, with any SQLite client, on a copy while Cursor is closed. Conversations are JSON values in the cursorDiskKV table under keys starting composerData and bubbleId. The layout is undocumented and can change.
Sources
Waitlist
Your sessions, your call.
We are building an opt-in marketplace where developers license redacted sessions they pick, one by one. Join to hear first.
Read next
- Claude CodeWhere Claude Code stores your session historyClaude Code keeps every session as a JSONL file in ~/.claude/projects and deletes them after 30 days by default. How to find, resume, export, keep and delete them.Read +
- Codex CLIWhere OpenAI Codex CLI stores your session historyCodex CLI saves each session as a rollout JSONL file in ~/.codex/sessions by date and compresses old ones to .jsonl.zst. How to find, resume, archive and delete them.Read +
- Market$500, then $200: what one posting tells us about the price of a coding sessionIn October 2026 Mercor paid developers $500 per recorded coding session, then cut it to $200 within a week. What the price says about the market for agent session data.Read +