[FEATURE] Allow relocating active sessions to a new working directory

Status Fixed / completed
Maintainer reply None cached
Activity 9 comments · opened Feb 23, 2026 · closed Aug 17, 2026

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

View original on GitHub ↗

8 Comments

github-actions[bot] · 6 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/19903
  2. https://github.com/anthropics/claude-code/issues/25322
  3. https://github.com/anthropics/claude-code/issues/3473

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

yionis01 · 6 months ago

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

sardonyx001 · 6 months ago

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

alexph-dev · 5 months ago

looking for same!

samarthkathal · 4 months ago

Hoping this gets prioritized!

davidaparicio · 2 months ago

Have you tried with the /cd slash command?

pgalbraith · 1 month ago

/cd is not supported in the desktop app at all

patrickmullen-b2d · 1 month ago

+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-dir doesn'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 --cwd on claude --resume (per #36937) would cover most of this.

Showing cached comments. Read the full discussion on GitHub ↗