Problem
/recall indexes Claude Code (~/.claude/projects/), Codex (~/.codex/sessions/), and pi (~/.pi/agent/sessions/), but not Cursor Agent sessions.
Cursor stores agent transcripts separately:
~/.cursor/projects/<encoded-workspace>/agent-transcripts/<session-uuid>/<session-uuid>.jsonl
Users who work primarily in Cursor IDE or agent / Cursor CLI (agent --resume, agent resume, agent ls) cannot search those conversations with /recall. Example failure mode:
python recall.py "sort order" --project quick-gtasks
# No matching sessions found.
Meanwhile the same topic exists in Cursor transcripts under e.g. c-Users-*-src-quick-gtasks/agent-transcripts/....
Proposed solution
-
New source: cursor
- Glob
~/.cursor/projects/**/agent-transcripts/*/*.jsonl (only files where parent dir name equals file stem, i.e. canonical uuid/uuid.jsonl layout).
- Add
--source cursor filter; tag results [cursor].
-
Parser: parse_cursor_session
- Each JSONL line:
{"role": "user"|"assistant", "message": {"content": [...]}}.
- Reuse existing
extract_text(): index text blocks only; skip tool_use and other block types (same policy as other sources).
- Project path: prefer
working_directory from Shell tool_use blocks in the transcript; fall back to decoding the workspace slug after projects/ (slug decode cannot recover hyphens inside folder names, e.g. quick-gtasks splits to quick + gtasks).
- Timestamp: file
mtime (transcripts do not carry per-line timestamps today).
- Session ID: UUID from filename / parent folder.
-
read_session.py
- Detect Cursor via path (
/.cursor/projects/ + /agent-transcripts/) or message shape.
- Pretty-print user/assistant text like other sources.
-
Resume instructions (document in SKILL.md)
cd /path/to/project
agent --resume <session-uuid> # or: agent resume / agent ls
-
Upgrade note
python recall.py --reindex "test"
Acceptance criteria
Implementation notes (for contributors)
| Area |
Detail |
| Collision risk |
Session IDs are UUIDs; unlikely to collide with Claude/Codex/pi keys. |
| Noise |
Skip numeric-only project slugs (1768486658315) and empty decoded paths for --project matching. |
| Performance |
Same mtime-based incremental indexing as existing sources; Cursor glob is one extra pass. |
| Privacy |
Same as today: index lives in ~/.recall.db (mode 600); only user/assistant text indexed. |
Related
- Cursor Agent CLI:
agent --help (--resume, --continue, agent ls).
- Transcript layout observed on Cursor 3.4.x (Windows); confirm on macOS/Linux before release.
Problem
/recallindexes Claude Code (~/.claude/projects/), Codex (~/.codex/sessions/), and pi (~/.pi/agent/sessions/), but not Cursor Agent sessions.Cursor stores agent transcripts separately:
Users who work primarily in Cursor IDE or
agent/ Cursor CLI (agent --resume,agent resume,agent ls) cannot search those conversations with/recall. Example failure mode:Meanwhile the same topic exists in Cursor transcripts under e.g.
c-Users-*-src-quick-gtasks/agent-transcripts/....Proposed solution
New source:
cursor~/.cursor/projects/**/agent-transcripts/*/*.jsonl(only files where parent dir name equals file stem, i.e. canonicaluuid/uuid.jsonllayout).--source cursorfilter; tag results[cursor].Parser:
parse_cursor_session{"role": "user"|"assistant", "message": {"content": [...]}}.extract_text(): indextextblocks only; skiptool_useand other block types (same policy as other sources).working_directoryfrom Shelltool_useblocks in the transcript; fall back to decoding the workspace slug afterprojects/(slug decode cannot recover hyphens inside folder names, e.g.quick-gtaskssplits toquick+gtasks).mtime(transcripts do not carry per-line timestamps today).read_session.py/.cursor/projects/+/agent-transcripts/) or message shape.Resume instructions (document in SKILL.md)
Upgrade note
python recall.py --reindex "test"Acceptance criteria
recall "sorting" --project quick-gtasksreturns Cursor sessions when transcripts exist (--projectuses prefix or substring match).--source cursorlimits to Cursor only.read_session.py <cursor-transcript.jsonl>prints user/assistant turns.~/.cursor/projects/.Implementation notes (for contributors)
1768486658315) and empty decoded paths for--projectmatching.~/.recall.db(mode 600); only user/assistant text indexed.Related
agent --help(--resume,--continue,agent ls).