feat(discovery): expand Cursor and Warp session recovery#130
Conversation
Add multi-source Cursor discovery for agent transcripts, desktop composer state, and store.db sessions while deduping duplicate local representations and ignoring non-session artifacts. Strengthen Warp conversation recovery with broader database path support, richer cwd/model fallbacks, agent-specific skip reasons, and new real-world integration coverage for backfill flows.
Handle Warp block rows whose is stored as a SQLite blob and carry recovered cwd values into -only fallback events. This fixes backfill cases where Warp conversations had enough metadata to match a repo but were still skipped as unrecoverable, and adds anonymized regression tests for the block-cwd fallback path.
Filter Warp agent conversation metadata by the requested backfill cutoff so recent-only scans do not resurrect stale meta-only sessions. Preserve Cursor bubble order while deduplicating IDs so reconstructed desktop transcripts keep their original turn sequence.
There was a problem hiding this comment.
Cadence PR Review
Goal
Expand backfill discovery so Cursor sessions are recovered from more real local storage formats and Warp sessions recover more usable metadata, especially around cwd/model fallbacks and real-world backfill behavior. The session evidence suggests the user was debugging why backfill missed sessions and wanted the discovery layer to explain or eliminate those skips.
| Signal | Details |
|---|---|
| Score | |
| Models | gpt-5.4 |
| Phases | 35% debugging, 50% implementation, 15% verification |
Key Decisions
- The user chose to widen recovery scope for Cursor and Warp instead of only debugging the existing backfill logs.
- The model consolidated multiple Cursor local representations behind source-priority deduping rather than emitting every discovered copy.
- The user and model validated the change with integration-style backfill tests that exercise recovered sessions and skip behavior.
Outcome
The model largely delivered the intended recovery expansion and kept the work aligned with the backfill-debugging goal. The main risk is some fairly heuristic parsing and path-recovery logic was introduced without corresponding evidence in the session notes that the user explicitly bounded those inference rules.
Recommendations

Mark heuristic recovery paths in the PR
-
For recovery-oriented PRs, explicitly label which parts are sample-backed versus heuristic. That makes it easier for reviewers to judge whether the model stayed within the intended risk envelope and catches overreach earlier.
Reframe
"If any new discovery logic relies on undocumented schema inference, call it out in the PR description as heuristic and list the fallback order."
If this review was useful, please react with 👍 below. Otherwise, react with 👎.
There was a problem hiding this comment.
Pull request overview
This PR expands local session discovery and recovery for Cursor and Warp so backfill can find more real-world session formats, dedupe duplicates across sources, and provide clearer skip diagnostics when sessions can’t be reconstructed.
Changes:
- Cursor: add multi-source discovery (legacy chatSessions, agent transcripts, store.db, desktop composer state) with dedupe + noise filtering.
- Warp: broaden database path discovery and improve session reconstruction via additional cwd/model fallbacks (ai input context, blocks, agent_conversations meta).
- Backfill/tests: enrich discovery skip logging and add new integration-style coverage for Cursor/Warp backfill flows.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/main.rs | Adds agent-specific discovery skip reasons + integration tests for Cursor/Warp backfill uploads. |
| src/agents/warp.rs | Expands Warp DB path probing, dedupes paths, and enriches recovery via blocks + agent_conversations metadata. |
| src/agents/cursor.rs | Reworks Cursor discovery to merge multiple storage formats, synthesize metadata headers, and dedupe across sources. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Cache Cursor workspace decoding, improve store.db JSON payload detection, and make transcript recovery tests path-agnostic across macOS, Linux, and Windows. Also defer Warp block fallback loading until after the recent-session emptiness check so backfill avoids unnecessary work on databases with no eligible conversations.
Encode Cursor project workspace keys using the same Windows drive-prefix shape expected by discovery so transcript and backfill tests pass on windows-latest. Also update Cursor desktop-path assertions to use cross-platform fixture paths instead of macOS-specific cwd suffixes.
Add multi-source Cursor discovery for agent transcripts, desktop composer state, and store.db sessions while deduping duplicate local representations and ignoring non-session artifacts.
Strengthen Warp conversation recovery with broader database path support, richer cwd/model fallbacks, agent-specific skip reasons, and new real-world integration coverage for backfill flows.