Search the documentation
20 pages for /add-dir.
Titles and paths first, then pages whose text carries it. Each row opens that page as this site last read it.
Subagents in the SDK
Claude Code CLI · in the page
agent-sdk/subagents
…itionalDirectories` (TypeScript) option, or the CLI's `--add-dir` or `/add-dir`, but doesn't watch them, so a new or edited file there needs a session restart. * **A programmatic agent with the same n…
Agent SDK reference - TypeScript
Claude Code CLI · in the page
agent-sdk/typescript
…of the directory that was added. `source` is `"slash_command"` when `/add-dir` added it and `"register_repo_root"` when the SDK control request did. #### `WorktreeCreateHookInput` ```typescript the…
Manage multiple agents with agent view
Claude Code CLI · in the page
agent-view
…ly-skip-permissions` Directories you added during the session with [`/add-dir`](/docs/en/permissions#additional-directories-grant-file-access-not-configuration) also carry through. Carrying `--allow-…
Claude Code changelog
Claude Code CLI · in the page
changelog
…is working — rule changes apply to the rest of the current turn * `/add-dir <path>` can now be used while Claude is working; `/add-dir`, `/autocompact`, `/theme`, `/help`, `/config` and `/advisor`…
CLI reference
Claude Code CLI · in the page
cli-reference
…d `/loop` sessions. Includes sessions that added this directory with `/add-dir`…
Commands
Claude Code CLI · in the page
commands
…---------------------------------------------------------------- | | `/add-dir <path>` | Add a working directory for file ac…
Hooks reference
Claude Code CLI · in the page
hooks
…ctoryAdded` | When a working directory is added mid-session via `/add-dir` or the SDK `register_repo_root` control request…
Automate actions with hooks
Claude Code CLI · in the page
hooks-guide
…ctoryAdded` | When a working directory is added mid-session via `/add-dir` or the SDK `register_repo_root` control request…
Set up Claude Code in a monorepo or large codebase
Claude Code CLI · in the page
large-codebases
…| Never | | `--add-dir` flag or `/add-dir` command | Only with the environment variable below | Yes | To load CLAUDE.md and rules files from a directory…
Connect Claude Code to tools via MCP
Claude Code CLI · in the page
mcp
…en/permissions#working-directories) you've granted with `--add-dir`, `/add-dir`, or the `additionalDirectories` setting. Claude Code sends `notifications/roots/list_changed` when that set changes. Bef…
Configure permissions
Claude Code CLI · in the page
permissions
…tup**: use `--add-dir <path>` CLI argument * **During session**: use `/add-dir` command * **Persistent configuration**: add to `additionalDirectories` in [settings files](/docs/en/settings#where-setti…
Plugins reference
Claude Code CLI · in the page
plugins-reference
…ctoryAdded` | When a working directory is added mid-session via `/add-dir` or the SDK `register_repo_root` control request…
Manage sessions
Claude Code CLI · in the page
sessions
…pass them again when you resume; directories added mid-session with `/add-dir` aren't restored either, though the session picker still uses them to locate the session. The standard settings files, su…
Claude Code settings reference
Claude Code CLI · in the page
settings-reference
…hs * **Default**: unset * **Per-session overrides**: `--add-dir` and `/add-dir` add directories for one session alongside this key ```json settings.json theme={null} { "permissions": { "additio…
Extend Claude with skills
Claude Code CLI · in the page
skills
…> #### Skills from additional directories The `--add-dir` flag and `/add-dir` command [grant file access](/docs/en/permissions#additional-directories-grant-file-access-not-configuration) rather than…
Customize your status line
Claude Code CLI · in the page
statusline
…| Additional directories added via `/add-dir` or `--add-dir`. Empty array if none have been added…
Create custom subagents
Claude Code CLI · in the page
sub-agents
…the working directory. When you add a directory with `--add-dir` or `/add-dir`, Claude Code also loads its `.claude/agents/` folder, alongside your project subagents. See [Additional directories](/do…
Tools reference
Claude Code CLI · in the page
tools-reference
…docs/en/permissions#working-directories) you added with `--add-dir`, `/add-dir`, or `additionalDirectories` in settings. Subagent sessions never carry over working directory changes. * If `cd` lands…
Week 28 · July 6–10, 2026
Claude Code CLI · in the page
whats-new/2026-w28
…e>/cd</code> now suggests directory paths as you type, matching <code>/add-dir</code></div> <div><code>/commit-push-pr</code> auto-allows <code>git push</code> to the repo's configured push remote…
Week 34 · August 17–21, 2026
Claude Code CLI · in the page
whats-new/2026-w34
…ssions#manage-permissions"><code>/permissions</code></a> or run <code>/add-dir \<path></code> while Claude is working; permission rule changes apply to the rest of the current turn</div> <div>When…