Command reference Β· Claude Code
/add-dir
Adds an additional working directory for file access in the current session.
Most .claude/ configuration is not automatically loaded from the added directory. You can later resume the session from the added directory with --continue or --resume.
π THE SAME TASK (βADD FILE/FOLDER TO CONTEXTβ) ON OTHER PLATFORMS
β WHEN TO USE IT?
Briefly access a second codebase without switching sessions
/add-dir ../shared-lib β look up a utility function from the shared lib while continuing work in the main project
Pull in reference files from a neighboring folder while keeping the prompt cache intact
/add-dir ../design-tokens β make design tokens available as reference for a styling task
β WHEN NOT TO?
Wanting to permanently switch to another project with its own CLAUDE.md
/add-dir does not automatically load the .claude/ configuration of the added directory
Better: use /cd instead β it picks up the target folder's CLAUDE.md and moves the session into its project storage
SOURCES
- Claude Code docs (official) β code.claude.com
MORE COMMANDS Β· Claude Code