[FEATURE] Allow relocating active sessions to a new working directory
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
Currently, Claude sessions are permanently bound to the working directory where they were created. If you move project
files or reorganize folders, you cannot move the session's context with them—you must start a new session in the new
location and lose conversation history. This quickly creates a mess.
Proposed Solution
Add a command to relocate the current session:
/relocate /new/working/directory
This would:
- Update the session's working directory metadata
- Update the project path in sessions-index.json
- Allow the session to continue seamlessly from the new location
- Optionally move/update any file references in the session history
Alternative Solutions
/move-session ~/new/path
Priority
Medium - Would be very helpful
Feature Category
Configuration and settings
Use Case Example
A user starts a session in ~/temp/project and builds up significant context (conversation history, file edits,
preferences). Later, they move the project to ~/projects/my-app/ but the session remains tied to the old path. The only
option is to start fresh and lose all context.
Additional Context
Why It Matters
- Preserves conversation context during project reorganization
- Supports common development workflows (moving repos, consolidating projects)
- Reduces friction when directory structures change
Showing cached comments. Read the full discussion on GitHub ↗
8 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
those are not dupes the way i read them, i am asking for not just switching directory during the conversation, but actually moving all the session history and context to a different directory
I found this issue while looking for a similar thing as I also want such a feature, but it seems like this could be implemented as a Claude Code commad.
https://gist.github.com/sardonyx001/b415bb5f043977fac8fb9a9bbb2b9b12
looking for same!
Hoping this gets prioritized!
Have you tried with the /cd slash command?
/cd is not supported in the desktop app at all
+1 — hit this again today. Mid-session, the work naturally shifted from analyzing a repo to producing planning docs in a sibling directory. There's no way to re-root the session: the shell cwd resets to the session root after every command, so every file operation outside the root needs absolute paths and extra permission prompts, and
/add-dirdoesn't change the primary root. The only real option — abandoning the session and starting a new one — throws away the full conversation context that motivated the move in the first place. Sessions are long-lived; the assumption that one session = one directory for its entire life doesn't match how multi-directory work actually flows. Even just--cwdonclaude --resume(per #36937) would cover most of this.