/add-dir vs /cd
People often think /add-dir and /cd both just change folders. /add-dir keeps the folder the session started in and lets Claude work in a second one too. /cd moves the whole session to a new folder, so Claude works from there instead. Both keep the chat. Use /add-dir when the task needs both folders, and /cd when the work has moved.
/add-dir Command
It lets the session work in one more folder.
/add-dir gives the session one more folder to work in, besides the one it started in. Claude can then read and edit files there too. Most .claude settings in the added folder are not loaded, so its own skills and rules stay out. Most network paths cannot be added. The --add-dir flag does the same at start-up.
/cd Command
It moves the session to a new folder. The chat stays.
/cd moves the session to a new working folder and keeps the chat. Claude then works from that folder, as if the session had started there. Type part of a path to see matching folders, and press Tab to pick one. It is different from /add-dir, which keeps the first folder and adds a second one.
In one line
- /add-dir Command
- It lets the session work in one more folder.
- /cd Command
- It moves the session to a new folder. The chat stays.