@tracebench/adapter-cursor
v0.3.1
Published
Tracebench adapter for Cursor (agent-transcripts JSONL + Composer state.vscdb).
Readme
@tracebench/adapter-cursor
Tracebench adapter for Cursor Agent session transcripts (JSONL).
Phase 1 (shipped): agent-transcripts JSONL
Cursor writes supplementary agent logs under:
~/.cursor/projects/<sanitized-project-path>/agent-transcripts/
<session-uuid>/<session-uuid>.jsonl # nested layout
<session-uuid>.jsonl # flat layout
<parent-uuid>/subagents/<subagent-uuid>.jsonl- Default root:
~/.cursor/projects(override withtracebench --cursor-dir <path>) - Format version:
2026-q1 - Harness id:
cursor
Limitations (JSONL only)
Cursor's JSONL export does not include:
tool_resultlines (tool outputs are not separate events)- per-line timestamps (synthetic timestamps from file mtime)
- token usage / model id (cost analytics show zeros)
The UI still renders tool_call events (Read, Write, Bash, Task, etc.) with input only.
Phase 2 (shipped): Composer SQLite (state.vscdb)
Full Composer / Ask history lives in Cursor's VS Code–style SQLite DBs. Paths by OS:
| OS | Global DB (bubbleId, composerData, …) |
|----|-------------------------------------------|
| macOS | ~/Library/Application Support/Cursor/User/globalStorage/state.vscdb |
| Linux | ~/.config/Cursor/User/globalStorage/state.vscdb |
| Windows | %APPDATA%\Cursor\User\globalStorage\state.vscdb |
Per-workspace index (Cursor ≤2.6): <User>/workspaceStorage/<id>/state.vscdb + workspace.json.
Read WAL consistently: copy state.vscdb, state.vscdb-wal, and state.vscdb-shm together.
Phase 2:
- Snapshots
state.vscdb(+-wal/-shm) for consistent reads while Cursor is open. - Lists composers with stored bubbles; loads
composerData:{id}and orderedbubbleId:{id}:{bubbleId}rows. - Normalizes bubbles into
CanonicalEvent—tool_call+tool_result(viatoolFormerData), thinking (capabilityType30), real timestamps, model id. - Dedupes with JSONL: when
composerIdmatches an agent-transcript folder UUID, the DB entry replaces JSONL.
Discovery merges both sources automatically. DB sessions use virtual paths cursor-db:{composerId}@{globalDbPath}.
CLI: tracebench --cursor-user-data-dir <path> overrides the OS-default Cursor User/ directory (see defaultCursorUserDataDir() in src/paths.ts).
SSH / WSL
Chat data stays on the machine running the Cursor UI (not the remote SSH host). Use the data dir for whichever Cursor install you actually run.
