/add-dir
A Claude Code slash command, read out of the shipped bundle. No mined inventory carries it: everything below comes from what this site has written about it.
Add a working directory for file access during the current session. Type a partial path to see matching directory suggestions; press Tab to accept one. Most .claude/ configuration isn't discovered from the added directory. You can't add most network paths, such as \\server\share. After a successful add, your DirectoryAdded hooks run. When you run it while Claude is responding, Claude Code asks you to confirm the directory right away, and once you confirm, Claude's next tool call in the same turn can access it. Before v2.1.234, Claude Code queued the command until the turn finished
Anthropic's own wording. Read off Commands, captured 2026-09-28.
In the changelogs
12Releases whose published page names /add-dir.
-
v2.1.281
Additional working directories carried across TUI mode switch
Folders added with
--add-diror/add-dirare now kept when Claude Code restarts to switch its terminal interface modefound in this entry's text, named in this entry
-
v2.1.269
Sandboxed-command deny message and blockOutsideReads flow renamed/reworked
Internal rework of the sandbox 'reads outside working directory' deny dialog, same message and behavior
found in this entry's text, named in this entry
-
v2.1.257
New permission setting: blockReadsOutsideWorkingDirectories
A new permissions setting blocks any file read outside your working directories, in prompts and in the sandbox.
found in this entry's text, named in this entry
-
v2.1.257
New settings key to confine file reads to trusted working directories
Reads outside your working directories can be made to fail closed, with a prompt option that persists the setting.
found in this entry's text, named in this entry
-
v2.1.257
Permission-dialog denial message for blocked-outside-reads
A read denied by the outside-reads setting now suggests /add-dir and says whether the setting is saved or session-only.
found in this entry's text, named in this entry
-
v2.1.257
/add-dir now explains why an already-accessible directory wasn't newly loaded
/add-dir now explains why an already-accessible directory was not loaded instead of quietly doing nothing.
found in this entry's text, named in this entry
-
v2.1.234
Some slash commands respond without waiting for a redraw
/help, /theme and /add-dir now respond instantly; /config and /advisor do only if a remote flag turns on.
named in this entry, found in this entry's text
-
v2.1.219
New DirectoryAdded hook event
You can now run a hook whenever a directory is added mid-session, including via /add-dir.
named in this entry, found in this entry's text
-
v1.0.62
🆕 Enhanced
/add-dirCommandfound in this entry's text
-
v1.0.62
️ Architecture
found in this entry's text
-
v1.0.27
Working Directory Management Improvements
found in this entry's text
-
v1.0.23
New Features
found in this entry's text
First cited
5The earliest release whose published evidence quoted /add-dir was v2.1.219, 24 Jul 2026. That is the oldest release this project wrote about it, so it is a floor on the name's age and not the release that introduced it. It is not a presence reading: which builds carried the name is the table below.
Presence across releases
0The miner has never read a build containing this name. It is here because a changelog entry of ours names it, which is evidence that it existed and not evidence of which releases carried it. The inventory starts at v2.1.138 and everything older than that was never mined.
Read out of the published npm bundle release by release, and out of Anthropic's own documentation as this site captured it. Nothing on this page is a description anybody here wrote about what the slash command does. All slash commands.