Skip to content
BENIBIX Learn

/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.

AI⌨️ Claude Code

/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.

Example
Jack's app uses a library that lives in a folder next to it. He runs /add-dir ../shared-lib, and Claude fixes the bug in both places in one go.
Why it matters
Real work often spans two folders. This lets one session see both without moving.
Full entry
AI⌨️ Claude Code

/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.

Example
Lucy planned a change with Claude in the web app folder. The real work is in the API, so she runs /cd ../api and goes on with the same chat.
Why it matters
You do not have to start over and explain the task again just because the work moved.
Full entry

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.