Move a conversation to a new project root folder
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
Research direction
Start by tracing the existing Provider boundary, session scanning, cache handling, and running-session detection, then inspect src/providers/claude/ for encoding and transcript handling. Define the relocation plan and apply flow around the TUI and --move --dry-run entry point. Done means safe, provider-scoped relocation with correct cwd rewrites, backups, conflict and running-session checks, and resumability.
Written by the indexing model from the issue text.
Description
Summary
Let the user change a session's project root folder from ccpick, so a conversation whose project was moved or renamed on disk can be resumed from the new location.
Today such a session is dimmed and Enter is blocked with project dir no longer exists. Claude Code ties a session to its original directory: the transcript lives under projects/<encoded-cwd>/<session-id>.jsonl and every message line records cwd. Resuming from a different folder doesn't find the session.
Proposed behaviour
- A key on the selected session (e.g.
Ctrl-M/ "move") opens a dialog to enter the new root folder. Pre-filled with the current cwd and completed against real directories. - It works for sessions whose project dir is missing and for ones that still exist (e.g. a repo cloned to a new path).
- Before applying, a confirmation shows what will change: files moved and number of lines rewritten.
- After a move the session is re-scanned and resumable from the new folder.
What a move does (Claude provider)
To verify against current Claude Code behaviour before implementing:
- Compute the new project directory name with Claude's encoding (every non-alphanumeric character in the absolute path becomes
-, e.g./home/me/code/app→-home-me-code-app). - Move
<store>/<old-encoded>/<session-id>.jsonlto<store>/<new-encoded>/<session-id>.jsonl. Also move the session's sibling data directory (<session-id>/, e.g. subagent transcripts) if present. - Rewrite
cwdon every line that has it, only where it equals the old root or is under it (/old/root/sub→/new/root/sub). Leave all other content untouched, including message text and tool payloads. - Check other per-session state that references the path (e.g.
file-history,todos,sessions/<pid>.json) and decide per item whether to update it or leave it.
Safety
- Refuse while the session is running (running-session detection already exists).
- Write atomically: the new file goes to a temp path and is renamed; the old file is removed only after the new one is fully written.
- Keep a backup of the original transcript (e.g.
<session-id>.jsonl.ccpick-bak), or offer an undo of the last move. - If the destination already has a file for that session id, abort.
- Dry-run output (
ccpick --move <session-id> <new-root> --dry-run) so the change can be inspected, and so it can be scripted and tested.
Architecture
- This is ccpick's first write operation. It needs an explicit new
Providermethod, e.g.relocate_session(&self, source, session, new_root) -> Result<RelocationPlan>andapply(plan). Claude-specific encoding and line rewriting stay insrc/providers/claude/. - Shared UI shows the plan and asks for confirmation.
- The cache entry for the old path is dropped and the new file scanned.
- Sessions from the other environment (WSL ↔ Windows, see #1): support moving within that environment's path form, or disable the action for foreign sessions in the first version.
Acceptance criteria
- A session whose project dir was renamed can be moved to the new dir from the TUI and then resumed with its history intact.
-
--move … --dry-runprints the planned file moves and cwd rewrites without changing anything; without--dry-runit applies them. - Only
cwdvalues equal to or under the old root are rewritten; tests prove message content containing the old path is untouched. - Running sessions can't be moved; destination conflicts abort without changes; the original is backed up.
- Encoding matches Claude Code's for paths with spaces, dots, underscores and non-ASCII characters (fixtures).
- Provider boundary kept: no Claude-specific logic outside
src/providers/claude/.
- Dominant language
- Rust
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from outsharked/ccpick
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
outsharked/ccpick#10 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
outsharked/ccpick#4 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
outsharked/ccpick#12 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 76/100
outsharked/ccpick#11 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 52/100
outsharked/ccpick#9 ·
All issues in outsharked/ccpick
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
kwakseongjae/auto-hwp#319 ·
-
area:cli bug filter-quality good first issue priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
bevyengine/bevy#25861 ·
-
comp-datalake
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ClickHouse/ClickHouse#121222 ·
-
enhancement remote
Difficulty 2/5 1-3 hours Newbie friendliness 68/100