Follow Discord
Sweep 22 Oct 2026 · 04:32Z Build v2.1.308 527 read Stable v2.1.308 Latest v2.1.308 Next v2.1.308 Feeds RSS JSON llms.txt llms-full.txt Unofficial

/add-dir

slash never mined documented JSON

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.

First seen — never in a mined build
Last seen — never in a mined build
Builds0 / 149on this box, as of v2.1.308
Written about v1.0.23 first named in a changelog, 13 Jun 2025

In the changelogs

12

Releases whose published page names /add-dir.

  1. v2.1.281
    Additional working directories carried across TUI mode switch

    Folders added with --add-dir or /add-dir are now kept when Claude Code restarts to switch its terminal interface mode

    found in this entry's text, named in this entry

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

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

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

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

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

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

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

  9. v1.0.62
    🆕 Enhanced /add-dir Command

    found in this entry's text

  10. v1.0.62
    ️ Architecture

    found in this entry's text

  11. v1.0.27
    Working Directory Management Improvements

    found in this entry's text

  12. v1.0.23
    New Features

    found in this entry's text

First cited

5

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

ReleaseDateThe span that was quoted
v2.1.21924 Jul 2026"slash_command" for /add-dir, "register_repo_root" for the SDK control_request.
v2.1.2571 Sep 2026Ask the user to add the directory with /add-dir, or to remove that setting.
v2.1.2571 Sep 2026Reads outside the working directories are blocked (permissions.blockReadsOutsideWorkingDirectories). Add the directory with /add-dir, or remove that setting.
v2.1.2571 Sep 2026the permissions.blockReadsOutsideWorkingDirectories setting blocks reads outside the working directories. Ask the user to add the directory with /add-dir, or to remove that setting.
v2.1.26911 Sep 2026The user chose to block reads outside the working directories (permissions.blockReadsOutsideWorkingDirectories). Ask the user to add the directory with /add-dir

Presence across releases

0

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.

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.

Feedback