Cursor CLI

The cursor-agent terminal CLI, modelled as its own backend (cursor-cli) separate from the desktop IDE. Its data spans two home directories: the original ~/.cursor/ tree (transcripts, plans, AI-tracking) and the newer lowercase ~/.config/cursor/ tree (prompt history and chat store.db blobs). The prompt-history adapter does not yet provide a proof-bound prompt-to-conversation locator, so --deep cannot select Cursor CLI transcripts; use --exhaustive for conversation coverage.

Stores

Role:

primary_chat

Format:

jsonl

Coverage:

default_search

Adapter:

cursor_cli.transcripts_jsonl.v1

Role:

supplementary_chat

Format:

jsonl

Coverage:

default_search

Adapter:

cursor_cli.transcripts_jsonl.v1

Role:

app_state

Format:

json_object

Coverage:

catalog_only

Adapter:

-

catalog store
catalog store
Role:

app_state

Format:

json_object

Coverage:

catalog_only

Adapter:

-

Role:

app_state

Format:

opaque

Coverage:

catalog_only

Adapter:

-

catalog store
catalog store
Role:

app_state

Format:

json_object

Coverage:

catalog_only

Adapter:

-

catalog store
catalog store
Role:

plan

Format:

md_frontmatter

Coverage:

catalog_only

Adapter:

-

catalog store
catalog store
Role:

app_state

Format:

json_object

Coverage:

catalog_only

Adapter:

-

Role:

source_tree

Format:

opaque

Coverage:

catalog_only

Adapter:

-

Role:

supplementary_chat

Format:

sqlite

Coverage:

default_search

Adapter:

cursor_cli.ai_tracking_sqlite.v1

Role:

prompt_history

Format:

json_array

Coverage:

default_search

Adapter:

cursor_cli.prompt_history_json.v1

inspectable store
inspectable store
Role:

primary_chat

Format:

sqlite

Coverage:

inspectable

Adapter:

cursor_cli.chats_protobuf.v1

inspectable store
inspectable store
Role:

instruction

Format:

text

Coverage:

inspectable

Adapter:

cursor_cli.skills_text.v1

inspectable store
inspectable store
Role:

supplementary_chat

Format:

text

Coverage:

inspectable

Adapter:

cursor_cli.uploads_text.v1

inspectable store
inspectable store
Role:

app_state

Format:

text

Coverage:

inspectable

Adapter:

cursor_cli.agent_tools_text.v1

cursor-cli.transcripts

cursor-cli.transcripts
default store
default store
cursor-cli.transcripts

JSONL Anthropic-style: role, message.content[] with text/tool_use blocks (tool outputs live in the separate cursor-cli.agent_tools store, not inline). No native timestamp — agentgrep infers from the file’s mtime. Tool outputs sometimes [REDACTED] in older cursor-agent versions.

Agent:

Cursor CLI

Role:

primary_chat

Format:

jsonl

Coverage:

default_search

Path:

${HOME}/.cursor/projects/<id>/agent-transcripts/<session_uuid>/<session_uuid>.jsonl

Adapter:

cursor_cli.transcripts_jsonl.v1

Data version:

-

Version strategies:

-

Observed:

cursor-agent 2026.06.19-653a7fb (2026-06-21)

Default search:

yes

Parsed by agentgrep via parse_cursor_cli_transcript (cursor_cli.transcripts_jsonl.v1).

cursor-cli.subagent_transcripts

cursor-cli.subagent_transcripts
default store
default store
cursor-cli.subagent_transcripts

Same JSONL Anthropic-style shape as cursor-cli.transcripts, nested under a session’s subagents/ directory.

Agent:

Cursor CLI

Role:

supplementary_chat

Format:

jsonl

Coverage:

default_search

Path:

${HOME}/.cursor/projects/<id>/agent-transcripts/<session_uuid>/subagents/<agent>.jsonl

Adapter:

cursor_cli.transcripts_jsonl.v1

Data version:

-

Version strategies:

-

Observed:

cursor-agent 2026.06.19-653a7fb (2026-06-21)

Default search:

yes

Subagent transcript files are conversation content, not primary sessions.

cursor-cli.repo_meta

cursor-cli.repo_meta
catalog store
catalog store
cursor-cli.repo_meta

Project tree/manifest metadata.

Agent:

Cursor CLI

Role:

app_state

Format:

json_object

Coverage:

catalog_only

Path:

${HOME}/.cursor/projects/<id>/repo.json

Adapter:

-

Data version:

-

Version strategies:

-

Observed:

cursor-agent 2026.06.19-653a7fb (2026-06-21)

Default search:

no

cursor-cli.tools

cursor-cli.tools
catalog store
catalog store
cursor-cli.tools

MCP tool registry and approval records.

Agent:

Cursor CLI

Role:

app_state

Format:

json_object

Coverage:

catalog_only

Path:

${HOME}/.cursor/projects/<id>/{mcps/*/SERVER_METADATA.json,tools/*.json,mcp-approvals.json}

Adapter:

-

Data version:

-

Version strategies:

-

Observed:

cursor-agent 2026.06.19-653a7fb (2026-06-21)

Default search:

no

cursor-cli.terminals

cursor-cli.terminals
catalog store
catalog store
cursor-cli.terminals

Terminal output logs.

Agent:

Cursor CLI

Role:

app_state

Format:

opaque

Coverage:

catalog_only

Path:

${HOME}/.cursor/projects/<id>/terminals/

Adapter:

-

Data version:

-

Version strategies:

-

Observed:

cursor-agent 2026.06.19-653a7fb (2026-06-21)

Default search:

no

cursor-cli.canvases

cursor-cli.canvases
catalog store
catalog store
cursor-cli.canvases

Cursor canvas state.

Agent:

Cursor CLI

Role:

app_state

Format:

json_object

Coverage:

catalog_only

Path:

${HOME}/.cursor/projects/<id>/canvases/

Adapter:

-

Data version:

-

Version strategies:

-

Observed:

cursor-agent 2026.06.19-653a7fb (2026-06-21)

Default search:

no

cursor-cli.plans

cursor-cli.plans
catalog store
catalog store
cursor-cli.plans

YAML frontmatter (name, overview, todos[], isProject) plus markdown body.

Agent:

Cursor CLI

Role:

plan

Format:

md_frontmatter

Coverage:

catalog_only

Path:

${HOME}/.cursor/plans/*.plan.md

Adapter:

-

Data version:

-

Version strategies:

-

Observed:

cursor-agent 2026.06.19-653a7fb (2026-06-21)

Default search:

no

cursor-cli.state

cursor-cli.state
catalog store
catalog store
cursor-cli.state

UI tip-shown flags and legacy-cleanup markers.

Agent:

Cursor CLI

Role:

app_state

Format:

json_object

Coverage:

catalog_only

Path:

${HOME}/.cursor/agent-cli-state.json

Adapter:

-

Data version:

-

Version strategies:

-

Observed:

cursor-agent 2026.06.19-653a7fb (2026-06-21)

Default search:

no

cursor-cli.worktrees

cursor-cli.worktrees
catalog store
catalog store
cursor-cli.worktrees

Full git worktrees used as code context by the CLI agent. Not chat — catalogued so future adapter PRs do not index source code as history.

Agent:

Cursor CLI

Role:

source_tree

Format:

opaque

Coverage:

catalog_only

Path:

${HOME}/.cursor/worktrees/

Adapter:

-

Data version:

-

Version strategies:

-

Observed:

cursor-agent 2026.06.19-653a7fb (2026-06-21)

Default search:

no

Source trees, not transcripts; would drown real hits.

cursor-cli.ai_tracking

cursor-cli.ai_tracking
default store
default store
cursor-cli.ai_tracking

SQLite with conversation_summaries(conversationId, title, tldr, overview, summaryBullets, model, mode, updatedAt) — title and prose summaries of CLI agent chats, not raw transcripts. Some installs have the table empty even when the CLI agent runs — the tracker may be disabled or unused; agentgrep tolerates that silently.

Agent:

Cursor CLI

Role:

supplementary_chat

Format:

sqlite

Coverage:

default_search

Path:

${HOME}/.cursor/ai-tracking/ai-code-tracking.db

Adapter:

cursor_cli.ai_tracking_sqlite.v1

Data version:

-

Version strategies:

-

Observed:

cursor-agent 2026.06.19-653a7fb (2026-06-21)

Default search:

yes

cursor-cli.prompt_history

cursor-cli.prompt_history
default store
default store
cursor-cli.prompt_history

Flat JSON array of strings — one entry per prompt typed into cursor-agent, oldest first. The CLI’s up-arrow recall buffer; no per-entry timestamps, so agentgrep stamps records with the file mtime. Lives under the lowercase ~/.config/cursor home, separate from the ~/.cursor transcript tree.

Agent:

Cursor CLI

Role:

prompt_history

Format:

json_array

Coverage:

default_search

Path:

${HOME}/.config/cursor/prompt_history.json

Adapter:

cursor_cli.prompt_history_json.v1

Data version:

-

Version strategies:

-

Observed:

cursor-agent 2026.06.19-653a7fb (2026-06-21)

Default search:

yes

Cursor’s prompt-history store, parity with claude.history / codex.history / grok.prompt_history. Parsed via parse_cursor_prompt_history (cursor_cli.prompt_history_json.v1).

cursor-cli.chats

cursor-cli.chats
inspectable store
inspectable store
cursor-cli.chats

Per-session SQLite with meta(key, value) and blobs(id, data) tables. meta holds a single row keyed '0' whose value is hex-encoded JSON nesting the session metadata (agentId, latestRootBlobId, …); blobs holds content-addressed protobuf messages (64-char sha256 ids) forming a Merkle graph from the root blob. Cursor publishes no schema, so agentgrep walks the protobuf wire format generically and surfaces readable UTF-8 runs — best-effort and date-versioned, not an official format.

Agent:

Cursor CLI

Role:

primary_chat

Format:

sqlite

Coverage:

inspectable

Path:

${HOME}/.config/cursor/chats/<project_hash>/<session_uuid>/store.db

Adapter:

cursor_cli.chats_protobuf.v1

Data version:

-

Version strategies:

catalog_observation

Observed:

cursor-agent 2026.06.19-653a7fb (2026-06-21)

Default search:

no

Opt-in (inspectable), not searched by default: the protobuf extraction is best-effort and overlaps the cleaner cursor-cli.transcripts JSONL. Parsed via parse_cursor_cli_chats_db (cursor_cli.chats_protobuf.v1) when the store is explicitly included.

cursor-cli.skills

cursor-cli.skills
inspectable store
inspectable store
cursor-cli.skills

Skill definitions installed for cursor-agent — SKILL.md files with YAML frontmatter under ~/.cursor/skills/ (user) and ~/.cursor/skills-cursor/ (built-in). Instruction content that steers future sessions; inspectable, parity with claude.skills.

Agent:

Cursor CLI

Role:

instruction

Format:

text

Coverage:

inspectable

Path:

${HOME}/.cursor/{skills,skills-cursor}/<skill>/SKILL.md

Adapter:

cursor_cli.skills_text.v1

Data version:

-

Version strategies:

-

Observed:

cursor-agent 2026.06.19-653a7fb (2026-06-21)

Default search:

no

cursor-cli.uploads

cursor-cli.uploads
inspectable store
inspectable store
cursor-cli.uploads

User-uploaded Markdown attachments the user fed the agent as conversation input (plan/reference extracts). Inspectable opt-in supplementary content, not searched by default.

Agent:

Cursor CLI

Role:

supplementary_chat

Format:

text

Coverage:

inspectable

Path:

${HOME}/.cursor/projects/<id>/uploads/<name>.md

Adapter:

cursor_cli.uploads_text.v1

Data version:

-

Version strategies:

-

Observed:

cursor-agent 2026.06.19-653a7fb (2026-06-21)

Default search:

no

cursor-cli.agent_tools

cursor-cli.agent_tools
inspectable store
inspectable store
cursor-cli.agent_tools

Captured tool-result payloads written per project under agent-tools/*.txt, distinct from the tools/*.json registry. Tool output rather than chat; inspectable opt-in, not searched by default.

Agent:

Cursor CLI

Role:

app_state

Format:

text

Coverage:

inspectable

Path:

${HOME}/.cursor/projects/<id>/agent-tools/<name>.txt

Adapter:

cursor_cli.agent_tools_text.v1

Data version:

-

Version strategies:

-

Observed:

cursor-agent 2026.06.19-653a7fb (2026-06-21)

Default search:

no

Record schemas

Transcript JSONL

cursor-cli.transcripts is Anthropic-style JSONL: role, message.content[] with text/tool_use content blocks (tool outputs live in the separate cursor-cli.agent_tools store, not inline). No native per-turn timestamp — agentgrep infers from the file’s mtime.

Sub-agent dispatches nest below a session’s subagents/ directory and share the same JSONL record shape. agentgrep reports them as the distinct store cursor-cli.subagent_transcripts so nested sub-agent files do not collapse into cursor-cli.transcripts.

AI-tracking summaries

cursor-cli.ai_tracking is a SQLite store with a conversation_summaries table: conversationId, title, tldr, overview, summaryBullets, model, mode, updatedAt.

Prompt history

cursor-cli.prompt_history is a flat JSON array at ~/.config/cursor/prompt_history.json — one entry per prompt typed into cursor-agent, oldest first. This is the CLI’s up-arrow recall buffer and gives Cursor the same prompt-history store the Claude, Codex, and Grok backends expose. There are no per-entry timestamps, so records share the file’s mtime.

Protobuf chat databases

cursor-cli.chats is a per-session SQLite database at ~/.config/cursor/chats/<project_hash>/<session_uuid>/store.db. Its meta table holds a single row keyed '0' with hex-encoded JSON metadata (agentId, latestRootBlobId, …), alongside a blobs table of content-addressed protobuf messages forming a graph from the root blob. Cursor publishes no schema, so agentgrep walks the protobuf wire format generically and surfaces the readable UTF-8 runs it finds — a best-effort, date-versioned adapter. Because the extraction is noisier than and overlaps the JSONL transcripts, the store is inspectable (opt-in) rather than searched by default; include it explicitly to parse it.

Skills

cursor-cli.skills covers SKILL.md definitions installed for cursor-agent under ~/.cursor/skills/ (user) and ~/.cursor/skills-cursor/ (built-in). Instruction content that steers future sessions — inspectable (opt-in), parity with claude.skills.

Uploads

cursor-cli.uploads covers Markdown attachments the user fed the agent as conversation input, under ~/.cursor/projects/<id>/uploads/*.md. Inspectable (opt-in) supplementary content, not searched by default.

Project context

Store

model

cwd

branch

cursor-cli.transcripts

projects/<name>/, dash-decoded

cursor-cli.subagent_transcripts

projects/<name>/, dash-decoded

cursor-cli.chats

meta row’s lastUsedModel

never — cwd_hash only, from chats/<project_hash>/

cursor-cli.prompt_history

Nothing inside a Cursor CLI transcript says where the session ran. The only record of it is the projects/<name>/ directory the file sits under, and that name is the working directory with every separator replaced by - and nothing escaped — the lossy tier. agentgrep reconstructs the name against the filesystem and reports origin.cwd only when exactly one reconstruction resolves to a directory that exists. When two do, or when the project has since been moved or deleted, the record carries no cwd at all rather than a plausible one: it drops out of a --cwd filter instead of answering it with a path you never worked in.

The decode runs once per project name per discovery pass, and its memo lives and dies with that pass, so a long-running TUI or MCP server never answers from a directory layout that has since changed.

The chat store’s working directory is not recoverable

cursor-cli.chats sits under chats/<project_hash>/<session_uuid>/, and that first segment is a digest, so the store answers cwd_hash: and never cwd: — the digest tier. The literal path does appear inside the store, but only as unstructured bytes inside the protobuf blobs, interleaved with unrelated file paths and with no key that reliably yields it, so there is nothing to read it out of. The digest comes from the path segment; it is never manufactured by hashing a cwd recovered from the transcripts next door. Treat origin.cwd here as asked and answered: it stays unset by design.

The same database’s meta row holds hex-encoded JSON whose lastUsedModel names the model the session ran on, so model: does reach this store. Cursor’s default sentinel is rejected rather than reported as a slug.