Anthropic's terminal-based AI coding tool Claude Code has gained a /cd command that moves a running session to a different directory without restarting. Conversation history and context carry over, and the tool automatically loads the destination project's CLAUDE.md (project instruction file).
Claude Code · v2.1.169+
New /cd command lets a session change directories — without restarting
Anthropic's terminal coding tool can now move to a different working directory mid-session. Conversation history and context are preserved, and the target directory's CLAUDE.md loads automatically.
0
restarts needed to switch projects
100%
prompt cache preserved on move
1
continuous conversation across repos
Switching projects: before vs now
Steps per project switch — each step in the old flow reset context and rebuilt the prompt cache.
end session
run cd
restart tool
context reset
Before — 4 steps
→
/cd <path>
Moves the working directory
Reloads target CLAUDE.md as a message
Session storage migrates — resume & continue follow
Accepts relative & absolute paths
/add-dir <path>
Adds access to another directory
Session location stays unchanged
No CLAUDE.md reload
For reading alongside current project
Safety & requirements
Trust prompt
Confirmation appears the first time a directory is visited.
Cd permissions
Target directories can be restricted with permission rules.
Version gate
Requires v2.1.169+; older builds report "Unknown command".
Well received
Switching projects without restarting or wasting the prompt cache saves time for developers who relaunch the tool many times a day — ideal for monorepos and microservices.
Friction points
Some confusion over how CLAUDE.md loads in nested directories and over permission handling — and older versions simply error out.
Continue reading The rest of this article is for AI News Blitz readers. Choose an option below to keep reading.
Already purchased? Sign in ✓ Signed in — this article isn’t included in your current plan.Unlocking the full article…