promptgarten ๐ŸŒฑ
๐ŸŒ ES

Command reference ยท Claude Code

/cd

Moves the session to a new working directory.

Moves the session to a new working directory. The conversation's prompt cache is preserved: the new directory's CLAUDE.md is appended as a message instead of rebuilding the system prompt. The session is moved to the new directory's project storage, so --resume/--continue will find it there. Asks for trust the first time a directory is used. Can be restricted/disabled via 'Cd' permission rules. For access to an additional directory without moving: /add-dir. Requires Claude Code v2.1.169+.

โœ… WHEN TO USE IT?

Permanently move to the next project whose CLAUDE.md should apply from now on

/cd ../other-project โ€” continue the session fully in the new project

Store the session in the target folder's project storage so --resume finds it there

/cd ~/work/client-b before starting the next task

โ›” WHEN NOT TO?

Just briefly need a file from a neighboring folder while the main project stays active

/cd fully switches the session instead of just adding access

Better: use /add-dir to access the extra directory without moving

SOURCES