Background
PR #113 added Cursor adapter support by reading the SQLite chat store (globalStorage/state.vscdb). This works for retroactive discovery but doesn't provide real-time session capture.
Goal
Add real-time capture for Cursor sessions so curation can fire without waiting for the next scan, matching the experience for Claude Code and Codex.
Approach (corrected)
Cursor does have a hooks mechanism (https://cursor.com/docs/hooks, v1.7+), but it is NOT a drop-in equivalent of Claude Code's transcript_path. The hooks are event-based and fire-and-forget: sessionStart, beforeShellExecution, afterFileEdit, stop, etc. There is no single JSONL transcript file emitted that we can tail the way we do for the JSONL agents.
So real-time capture here likely means one of:
- a stop / sessionEnd hook that triggers a re-scan of the just-finished composer in state.vscdb (cheapest, reuses the existing SQLite adapter), or
- reconstructing a transcript from the event stream itself (more work, and the events carry less than the store does).
Worth scoping which one is actually worth it before committing. The store reader from #113 already covers the data; the open question is purely latency.
Acceptance Criteria
/cc @goktugecertastan-cyber - you mentioned wiring this as a follow-up. Heads up that the hooks look event-based rather than a transcript file, so a stop-hook that re-scans the store may be the simplest route. Curious if that matches what you saw.
Background
PR #113 added Cursor adapter support by reading the SQLite chat store (globalStorage/state.vscdb). This works for retroactive discovery but doesn't provide real-time session capture.
Goal
Add real-time capture for Cursor sessions so curation can fire without waiting for the next scan, matching the experience for Claude Code and Codex.
Approach (corrected)
Cursor does have a hooks mechanism (https://cursor.com/docs/hooks, v1.7+), but it is NOT a drop-in equivalent of Claude Code's transcript_path. The hooks are event-based and fire-and-forget: sessionStart, beforeShellExecution, afterFileEdit, stop, etc. There is no single JSONL transcript file emitted that we can tail the way we do for the JSONL agents.
So real-time capture here likely means one of:
Worth scoping which one is actually worth it before committing. The store reader from #113 already covers the data; the open question is purely latency.
Acceptance Criteria
/cc @goktugecertastan-cyber - you mentioned wiring this as a follow-up. Heads up that the hooks look event-based rather than a transcript file, so a stop-hook that re-scans the store may be the simplest route. Curious if that matches what you saw.