[FEATURE] Allow changing the primary working directory mid-session (live /cd)

Resolved 💬 1 comment Opened Jun 1, 2026 by thetrovadour Closed Jul 5, 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

As for today, well, the primary working directory is fixed at launch. /add-dir adds extra directories to the workspace, but it doesn't move the cwd — the original launch folder stays the root for relative paths, shell commands, and project context you know.

The only way to actually switch projects is to Ctrl+C the session and relaunch Claude from the new folder. That throws away the entire in-memory session: conversation context, plan state, and any warmed-up understanding of the work. Like, I have a repo but that repo is associated to another repo and Claude has to start-from-scratch the understanding of each session.

Proposed Solution

A slash command — e.g. /cd <path> — that repoints the primary working directory in place, without restarting the session:

  • Relative paths, Bash cwd, and project root all follow the new directory.
  • Session context (history, plan mode, todos) is preserved.
  • Ideally it picks up the new directory's CLAUDE.md / project instructions, the same way a fresh launch there would.

/add-dir is additive — it widens scope but keeps the same root. The need here is to change the root live, the way cd works in a shell, so a single long-lived session can move from project A to project B without being killed and re-spawned.

Alternative Solutions

I usually do 'Ctrl + C' and let Claude read the previous repo. Almost always the good general context is lost.

Priority

Medium - Would be very helpful

Feature Category

CLI commands and flags

Use Case Example

I run one persistent session and move between several repos in a day. Relaunching per repo means losing context every switch. A live /cd would let the session travel with me across projects.

Additional Context

Nothing more to add :)

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗