Why Export Your Cursor Chat History?
Your Cursor conversations contain more than just code snippets. They hold:
- **Architectural decisions** — why you chose one approach over another
- **Constraints discovered** — edge cases and limitations you found
- **Problem-solving paths** — what you tried, what failed, what worked
- **Project context** — the accumulated understanding of your codebase
Losing this is like losing your project's institutional memoryLosing this is like losing your project's institutional memory/cursor/blog/cursor-context-loss-killing-productivity. That's why learning to save Cursor conversations and create a proper cursor chat backup is essential.
The Export Problem
Cursor AI export isn't straightforward. Cursor stores everything in a SQLite database at:
~/Library/Application Support/Cursor/User/globalStorage/state.vscdbThis file is:
- Not human-readable
- Not portable between machines
- Not designed for export
- Silently purged over time
There's no "File > Export" option. So what do you do?
Method 1: Manual Copy-Paste (Simple but Tedious)
The most basic approach:
- Open each conversation
- Select all text (Cmd+A)
- Copy to a text file
- Repeat for every thread
Pros:
- No tools required
- Works immediately
Cons:
- Extremely time-consuming
- Loses formatting and structure
- Easy to miss conversations
- No metadata (timestamps, thread info)
Best for: Quick one-off exports of a single conversation.
Method 2: CLI Export Tools
Several open-source tools can handle cursor sqlite export:
cursor-export:
npx cursor-export --workspace /path/to/projectcursor-chat-recovery:
python cursor_recovery.py --output ./exportPros:
- Automated extraction
- Preserves timestamps
- Can export all workspaces at once
Cons:
- Requires Node.js or Python setup
- Output is raw JSON (not human-friendly)
- No compression or summarization
- Doesn't preserve semantic meaning
Best for: Developers comfortable with CLI who need raw data dumps.
Method 3: Manual SQLite Access
For the technically adventurous:
sqlite3 ~/Library/Application\ Support/Cursor/User/globalStorage/state.vscdb
.tables
SELECT * FROM cursorDiskKV WHERE key LIKE 'composerData:%';Pros:
- Direct database access
- Full control over queries
- Can extract specific data
Cons:
- Requires SQLite knowledge
- Data is JSON-encoded blobs
- Easy to corrupt the database
- No semantic processing
Best for: Database-savvy developers debugging specific issues.
Method 4: Automatic Capture with RL4 (Recommended)
Since RL4 v2.0, you don't need to manually export anything. The extension automatically and retroactively captures your entire Cursor chat history the moment you install it.
How it works:
- **Install** — Get RL4 from the VS Code Marketplace
- **Automatic** — RL4 scans your Cursor SQLite database on activation
- **Continuous** — Every new conversation is captured in real-time
- **Retroactive** — Goes back to your very first prompt ever
What gets captured (in `.rl4/evidence/`):
chat_history.jsonl — Every message with timestamps
chat_threads.jsonl — Thread summaries, titles, topics
activity.jsonl — File saves, creates, deletes
sessions.jsonl — Work sessions (6h gap detection)
causal_links.jsonl — Chat → code change correlations
commits.jsonl — Git commit history
decisions.jsonl — Extracted decision recordsWhy this is different: Instead of a one-time export, RL4 creates a living evidence store that grows with your work. Every conversation, every file change, every decision — captured mechanically with SHA-256 checksums.
Best for: Everyone. Set it up once, never worry about export again.
Method 5: Search Your History via MCP
Once RL4 is capturing, you can search your entire chat history directly from the Cursor chat using MCP tools:
Search conversations:
Use search_chats to find conversations about "authentication"Ask questions with cited answers:
Use rl4_ask: "When did we decide to use JWT?"
→ Returns: "On Feb 2, you discussed JWT vs sessions in thread
'Auth Architecture'. Decision: JWT for stateless scaling.
[chat_history.jsonl L142 | 2026-02-02]"Search terminal commands:
Use search_cli to find recent failed buildsThis uses a RAG pipeline (BM25 + Reciprocal Rank Fusion) with citation-first formatting. It's like having Perplexity for your own development history.
Best for: Developers who want to find specific past conversations without manual search.
Comparison Table
| Method | Time | Portability | Search | Semantic Preservation | Auto |
|--------|------|-------------|--------|----------------------|------|
| Manual copy-paste | 30+ min | Low | No | Low | No |
| CLI tools | 5 min | Medium | No | Low | No |
| SQLite access | 10 min | Low | No | None | No |
| RL4 auto-capture | 0 min | High | Yes (MCP) | High | Yes |
| MCP search | Instant | High | RAG | High | Yes |
Best Practices for Export
Whichever method you choose for cursor chat backup:
Export regularly:
- End of each day
- Before Cursor updates
- Before renaming/moving projects
- Before switching machines
What to capture:
- All active project threads
- Threads with important decisions
- Problem-solving conversations
- Architectural discussions
What to skip:
- Trivial one-off questions
- Debugging sessions with no conclusions
- Outdated/superseded conversations
When Cursor Purges Your History
Here's something most developers don't know: Cursor silently purges old conversations.
There's no official retention policy, but users report:
- Conversations older than 30-60 days may disappear
- Heavy workspaces get purged faster
- There's no warning before purge
This makes regular exports essential, not optional. Understanding how context loss impacts productivityUnderstanding how context loss impacts productivity/cursor/blog/hidden-cost-context-loss-ai-development shows why this matters so much.
The Bigger Picture
Exporting chat history is really about context ownership.
Your AI conversations are valuable intellectual property. They represent hours of work, dozens of decisions, and accumulated project knowledge.
Keeping this context portable means:
- **Freedom** to switch tools without penalty
- **Continuity** across sessions and days
- **[Collaboration](/cursor/blog/onboard-developer-ai-context-guide)** by sharing context with teammates
- **Audit trails** for understanding past decisions
Cloud Backup with Supabase Sync
RL4 v2.0 includes optional cloud sync via Supabase. Once connected:
- Your evidence is automatically backed up every 24 hours
- Access your context from any device via `list_workspaces` + `set_workspace`
- No data loss even if Cursor purges conversations locally
- Cross-device search with the same MCP tools
To enable: `Cmd/Ctrl + Shift + P` → "RL4: Connect" → Sign in.
Ready to Export Smarter?
If you're tired of manual copy-paste or wrestling with raw JSON, the automatic capture approach eliminates the problem entirely.
**Get RL4 Snapshot**Get RL4 Snapshot/cursor/form — install once, capture everything automatically, and search your history with MCP. Learn how in our 5-minute tutorialLearn how in our 5-minute tutorial/cursor/blog/create-first-ai-snapshot-tutorial.
Your context is too valuable to be trapped in a SQLite database.