Skip to content
groundedby
Waitlist

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

Quick factsas of October 2026 (IDE 3.21, CLI 2026.10.22)
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>/
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:

  1. Developer: Delete Old Chats…
  2. Developer: GC Agent KV Blobs
  3. 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

  1. Cursor forum, staff answer on where chats are stored
  2. Cursor forum, staff answer on chat cleanup
  3. Cursor docs, CLI parameters

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.

Your email and the side you picked. Nothing else. Privacy