Skip to main content

Module cursor_desktop

Module cursor_desktop 

Source
Expand description

Cursor desktop (IDE app) sessions: rows in the app’s global state.vscdb (<User dir>/globalStorage/state.vscdb).

The desktop app keeps one composerHeaders table row per session (the discovery index) and, in the cursorDiskKV key-value table, a composerData:<composerId> state document plus one bubbleId:<composerId>:<bubbleId> JSON document per message (“bubble”). Bubble type 1 is the user, 2 the assistant; assistant bubbles carry text, thinking, or a toolFormerData tool call+result. The display log is authoritative: the app lists, renders, and offers to continue a session from these rows alone (verified against Cursor 3.16 by loading a profile with every agentKv blob deleted).

Deliberately not carried: the agentKv:blob:* content-addressed cache (the model-side request log). Its blobs are commingled across sessions with no session-scoped root pointer on disk, and the app regenerates what it needs from the bubbles.

Known representational losses through Common: image blocks, stop reasons, Block::Thinking::encrypted, Tool::Bash description/run_in_background, and text tool results that themselves parse as JSON (they come back as ToolOutput::Json).

Structs§

CursorDesktop
The Cursor desktop harness marker.
CursorDesktopStore
Reads and writes desktop sessions in a Cursor User directory (default ~/Library/Application Support/Cursor/User on macOS).
DesktopRow
One raw cursorDiskKV row: full key and verbatim TEXT value.
DesktopSession
Faithful representation of one desktop session: its composerHeaders row and every cursorDiskKV row keyed by its composer id. Cell values are kept as the raw TEXT the app wrote, byte-lossless.