You know that feeling when you rename a project folder and suddenly weeks of AI conversations just... vanish?
I do. It happened to me three times before I decided to fix it.
The Problem Nobody Talks About
Cursor IDE is incredible. But it has a dirty secret: your chat history is tied to your folder path.
Rename my-project to my-awesome-project? Gone.
Move it from ~/dev/ to ~/projects/? Gone.
Clone it to a new location? Gone.
The data isn't deleted β it's still sitting in ~/Library/Application Support/Cursor/User/workspaceStorage/(for MacOS). But Cursor can't find it anymore because the path changed.
I searched for solutions. Found forum posts with manual workarounds:
- Find the old workspace folder by hash
- Copy contents to the new folder
- Edit
workspace.jsonto update the path - Pray it works
That's insane. So I built a tool.
The Fix: One Command
cargo install cursor-helper
cursor-helper rename /old/path /new/path
# Or copy if you want to keep the old folder
cursor-helper rename -c /old/path /new/path
That's it. Your chat history, workspace settings, MCP cache β everything stays intact.
What Else It Does
Export Chats (With the Good Stuff)
Cursor's built-in export strips out thinking blocks and tool calls. Mine doesn't.
# Full export with AI reasoning, tool calls, and token counts
cursor-helper export-chat /path/to/project -v > full-chat-history.md
Output includes:
### π **Thinking** _12.3s_
<details>
<summary>Click to expand thinking...</summary>
The user wants me to refactor the authentication module...
</details>
### π§ **Tool: edit_file** [completed]
<details>
<summary>Parameters</summary>
{"path": "src/auth.rs", "old_string": "...", "new_string": "..."}
</details>
This is useful for:
- Documenting how you solved complex problems
- Training yourself (or others) on AI-assisted workflows
- Keeping receipts when the AI does something clever (or dumb)
List All Your Projects
cursor-helper list --sort chats --limit 10
ββββββββββββ¬βββββββββββββββββββββββββββββββββ¬ββββββββ¬βββββββββββββββββββ
β Remote β Path β Chats β Modified β
ββββββββββββΌβββββββββββββββββββββββββββββββββΌββββββββΌβββββββββββββββββββ€
β - β /Users/me/projects/cursor-help β 47 β 2026-01-19 16:04 β
β tunnel β /home/user/big-project β 23 β 2026-01-18 09:30 β
β ssh β /workspace/client-work β 12 β 2026-01-15 14:22 β
ββββββββββββ΄βββββββββββββββββββββββββββββββββ΄ββββββββ΄βββββββββββββββββββ
Clean Up Orphaned Data
Deleted some projects? Cursor keeps the workspace data forever.
cursor-helper clean --dry-run
Found 8 orphaned workspace(s):
/Users/me/.../abc123def456 (234.5 MB)
Original: file:///Users/me/deleted-project
Total: 1.2 GB in 8 item(s)
Reclaim that disk space.
How It Works
Cursor stores workspace data in two places:
-
workspaceStorage/<hash>/β Chat history, settings, state -
~/.cursor/projects/<folder-id>/β MCP cache, terminal info
The hash is computed as MD5(absolutePath + birthtimeMs). When you rename a folder, the path changes, the hash changes, and Cursor creates a new empty workspace.
cursor-helper:
- Finds the old workspace by scanning for matching folder URIs
- Moves/copies the project folder
- Moves/copies the workspace data to the new hash location
- Updates
workspace.jsonwith the new path - Updates
globalStorage/storage.jsonwith the new workspace reference
All in one command.
Installation
# From crates.io
cargo install cursor-helper
# Or grab a binary from GitHub Releases
Works on macOS, Linux (experimental), and Windows.
The Catch
Cursor must be closed when running write operations (rename, clone, backup, restore, clean).
Why? Cursor uses SQLite with WAL mode and keeps databases locked while running. If you modify files while it's open, you risk corruption or Cursor overwriting your changes on exit.
Read-only commands (list, stats, export-chat) work fine while Cursor is running.
Compared to Alternatives
| Tool | What it does | Rename support? |
|---|---|---|
| cursor-helper | Workspace management + export | β Yes |
| SpecStory | Auto-save chats to Markdown | β No |
| cursor-chat-transfer | Copy chats between workspaces | β No |
| cursor-chat-browser | Browse/export chat history | β No |
cursor-helper is the only tool that solves the rename/move problem.
Links
- GitHub: lucifer1004/cursor-helper
- crates.io: cursor-helper
MIT licensed. Contributions welcome.
This tool is not affiliated with Anysphere/Cursor. It reads your local data files for backup and portability β no servers, no APIs, no telemetry.
Have you lost chat history to a rename? Let me know in the comments.
Top comments (0)