{"name":"\/add-dir","slug":"add-dir","family":"slash","title":"Slash commands","noun":"slash command","description":"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](\/docs\/en\/permissions#additional-directories-grant-file-access-not-configuration) from the added directory. You can't add most [network paths](\/docs\/en\/errors#working-directory-is-a-network-path), such as `\\\\server\\share`. After a successful add, your [`DirectoryAdded` hooks](\/docs\/en\/hooks#directoryadded) 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","description_source":"docs","described_by":{"doc":"claude-code\/commands","title":"Commands"},"presence":{"first_seen":null,"removed_in":null,"in_current_build":false,"newest_mined":"2.1.308","builds":0,"mined_builds":149,"first_cited":{"version":"2.1.219","released_at":"2026-07-24 16:11:49","spans":5}},"aliases":[],"entries":[{"version":"2.1.281","anchor":"additional-working-directories-carried-across-tui-mode-switc","heading":"Additional working directories carried across TUI mode switch","line":"Folders added with `--add-dir` or `\/add-dir` are now kept when Claude Code restarts to switch its terminal interface mode","released_at":"2026-09-23 17:01:17","reason":"found in this entry's text, named in this entry"},{"version":"2.1.269","anchor":"sandboxed-command-deny-message-and-blockoutsidereads-flow-re","heading":"Sandboxed-command deny message and blockOutsideReads flow renamed\/reworked","line":"Internal rework of the sandbox 'reads outside working directory' deny dialog, same message and behavior","released_at":"2026-09-11 18:12:49","reason":"found in this entry's text, named in this entry"},{"version":"2.1.257","anchor":"new-permission-setting-blockreadsoutsideworkingdirectories","heading":"New permission setting: blockReadsOutsideWorkingDirectories","line":"A new permissions setting blocks any file read outside your working directories, in prompts and in the sandbox.","released_at":"2026-09-01 17:15:33","reason":"found in this entry's text, named in this entry"},{"version":"2.1.257","anchor":"new-settings-key-to-confine-file-reads-to-trusted-working-di","heading":"New settings key to confine file reads to trusted working directories","line":"Reads outside your working directories can be made to fail closed, with a prompt option that persists the setting.","released_at":"2026-09-01 17:15:33","reason":"found in this entry's text, named in this entry"},{"version":"2.1.257","anchor":"permission-dialog-denial-message-for-blocked-outside-reads","heading":"Permission-dialog denial message for blocked-outside-reads","line":"A read denied by the outside-reads setting now suggests \/add-dir and says whether the setting is saved or session-only.","released_at":"2026-09-01 17:15:33","reason":"found in this entry's text, named in this entry"},{"version":"2.1.257","anchor":"add-dir-now-explains-why-an-already-accessible-directory-wa","heading":"\/add-dir now explains why an already-accessible directory wasn't newly loaded","line":"\/add-dir now explains why an already-accessible directory was not loaded instead of quietly doing nothing.","released_at":"2026-09-01 17:15:33","reason":"found in this entry's text, named in this entry"},{"version":"2.1.234","anchor":"some-slash-commands-respond-without-waiting-for-a-redraw","heading":"Some slash commands respond without waiting for a redraw","line":"\/help, \/theme and \/add-dir now respond instantly; \/config and \/advisor do only if a remote flag turns on.","released_at":"2026-08-17 18:19:13","reason":"named in this entry, found in this entry's text"},{"version":"2.1.219","anchor":"new-directoryadded-hook-event","heading":"New DirectoryAdded hook event","line":"You can now run a hook whenever a directory is added mid-session, including via \/add-dir.","released_at":"2026-07-24 16:11:49","reason":"named in this entry, found in this entry's text"},{"version":"1.0.62","anchor":"enhanced-add-dir-command","heading":"\ud83c\udd95 Enhanced \/add-dir Command","line":null,"released_at":"2025-07-28 22:04:35","reason":"found in this entry's text"},{"version":"1.0.62","anchor":"architecture","heading":"\ufe0f Architecture","line":null,"released_at":"2025-07-28 22:04:35","reason":"found in this entry's text"}],"entries_total":12,"docs":[{"source":"claude-code","path":"commands","title":"Commands","documented":true},{"source":"claude-code","path":"agent-sdk\/subagents","title":"Subagents in the SDK","documented":false},{"source":"claude-code","path":"agent-sdk\/typescript","title":"Agent SDK reference - TypeScript","documented":false},{"source":"claude-code","path":"agent-view","title":"Manage multiple agents with agent view","documented":false},{"source":"claude-code","path":"artifacts","title":"Share session output as artifacts","documented":false},{"source":"claude-code","path":"changelog","title":"Claude Code changelog","documented":false},{"source":"claude-code","path":"cli-reference","title":"CLI reference","documented":false},{"source":"claude-code","path":"hooks","title":"Hooks reference","documented":false},{"source":"claude-code","path":"hooks-guide","title":"Automate actions with hooks","documented":false},{"source":"claude-code","path":"large-codebases","title":"Set up Claude Code in a monorepo or large codebase","documented":false}],"docs_total":13,"gates":[],"related":[],"url":"https:\/\/changelogs.core-directive.com\/reference\/slash\/add-dir","family_url":"https:\/\/changelogs.core-directive.com\/reference\/slash.json"}