← Docs hub

Cursor IDE adapter

Status: Production — Composer ingest from global state.vscdb Registry name: cursor_ide (alias cursor still resolves for CLI / old configs) Module: llmwiki.adapters.contrib.cursor_ide Source: llmwiki/adapters/contrib/cursor_ide.py

For Cursor Agent CLI sessions (~/.cursor/chats/), use the separate cursor_cli adapter.

What it reads

Cursor IDE stores Composer threads in the global SQLite DB:

# macOS
~/Library/Application Support/Cursor/User/globalStorage/state.vscdb

# Linux
~/.config/Cursor/User/globalStorage/state.vscdb

# Windows
%APPDATA%\Cursor\User\globalStorage\state.vscdb

Table composerHeaders lists threads (composerId, workspaceId, isArchived, isSubagent). Message bodies live in cursorDiskKV under bubbleId:<composerId>:<bubbleId> (type 1 = user, 2 = assistant). Per-workspace workspaceStorage/<hash>/ is used only for association when needed — not as the session file itself.

Each Composer thread is one sync session (non-file SessionRef). Archived threads are still ingested under the same composerId.

Enable it

Prefer llmwiki configure-sources: Enable Cursor IDE when the store is present, set a shared (or per-adapter) lookback, and save. After that, bare llmwiki sync includes cursor_ide — no second gate.

python3 -m llmwiki configure-sources
python3 -m llmwiki sync

One-off without changing the roster:

python3 -m llmwiki sync --adapter cursor_ide
# alias still works:
python3 -m llmwiki sync --adapter cursor

Set filters.since or adapters.cursor_ide.since (or pass --since) before the first large run so Composer history stays bounded — see Sync lookback.

Listed in llmwiki adapters / configure-sources as cursor_ide. Use cursor_cli for Agent CLI sessions under ~/.cursor/chats/.

Automated (headless) sessions

With filters.exclude_headless (default true), threads with composerHeaders.isSubagent = 1 (agents spawned from a parent Composer) are skipped. User-facing Composer chats stay eligible. Set "exclude_headless": false to include spawned threads.

Project slug derivation

When workspaceId is present (typically the workspaceStorage directory hash), the slug is cursor-<first-12-chars> — the same form as cursor_cli. Agent CLI’s ~/.cursor/chats/<hash>/ directory names may differ from IDE workspace hashes on some installs; full cross-adapter project merge is #126.

Configuration

{
  "adapters": {
    "cursor_ide": {
      "global_db": "~/.config/Cursor/User/globalStorage/state.vscdb",
      "roots": ["~/.config/Cursor/User/workspaceStorage"]
    }
  }
}

global_db is optional (platform defaults apply). roots still override workspaceStorage paths used for association. A legacy adapters.cursor block is still read if adapters.cursor_ide is absent.

Testing the adapter

python3 -m llmwiki adapters
python3 -m pytest tests/test_cursor_ide_adapter.py -q

See also

Keyboard shortcuts

⌘K / Ctrl+KOpen command palette
/Focus search
g hGo to home
g pGo to projects
g sGo to sessions
j / kNext / prev row (tables)
?Show this help
EscClose dialogs

Structured queries

Mix key:value filters with free text in the palette:

type:sessionOnly session pages
project:llm-wikiFilter by project name (substring)
model:claudeFilter by model name (substring)
date:>2026-03-01Sessions after a date
date:<2026-04-01Sessions before a date
tags:rustPages mentioning a tag/topic
sort:dateSort results by date (newest first)

Example: type:session project:llm-wiki date:>2026-04 sort:date