/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.
What it is
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 is [not discovered](/docs/en/permissions#additional-directories-grant-file-access-not-configuration) from the added directory. A successful add runs your [DirectoryAdded hooks](/docs/en/hooks#directoryadded). 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-08-28.
Presence across releases
The 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.
Changelog entries naming it
-
v2.1.234Some 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
-
v2.1.219New DirectoryAdded hook event
You can now run a hook whenever a directory is added mid-session, including via /add-dir.
named in this entry
Documentation pages
- Commands reference table Claude Code CLI
- Subagents in the SDK mentions it Claude Code CLI
- Agent SDK reference - TypeScript mentions it Claude Code CLI
- Manage multiple agents with agent view mentions it Claude Code CLI
- Claude Code changelog mentions it Claude Code CLI
- CLI reference mentions it Claude Code CLI
- Hooks reference mentions it Claude Code CLI
- Automate actions with hooks mentions it Claude Code CLI
- Set up Claude Code in a monorepo or large codebase mentions it Claude Code CLI
- Connect Claude Code to tools via MCP mentions it Claude Code CLI
- Configure permissions mentions it Claude Code CLI
- Plugins reference mentions it Claude Code CLI
- Manage sessions mentions it Claude Code CLI
A reference table page is one whose own table defines this name, and it is where the description above came from. A page that mentions it carries the name somewhere in its text and may say nothing about it at all. Every page carrying it.
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.