23 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-…
Share session output as artifacts
Claude Code CLI · in the page
artifacts
…ry with [`--add-dir`](/docs/en/cli-reference#cli-flags) at launch or `/add-dir` during the session. Claude already reads files in those directories, and in the temporary directory it writes pages to,…
Claude Code changelog
Claude Code CLI · in the page
changelog
…to, or deleting up to, a match on another line of the prompt * Fixed `/add-dir` path box letting Shift+Enter or a paste add a line break, and treating fast-typed "tab", "up" or "down" as those keys *…
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 direct…
Hooks reference
Claude Code CLI · in the page
hooks
…`DirectoryAdded` | When a working directory is added mid-session via `/add-dir` or the SDK `register_repo_root` control request | | `FileChanged` | When a watched file changes on disk. The `matcher` f…
Automate actions with hooks
Claude Code CLI · in the page
hooks-guide
…`DirectoryAdded` | When a working directory is added mid-session via `/add-dir` or the SDK `register_repo_root` control request | | `FileChanged` | When a watched file changes on disk. The `matcher` f…
Set up Claude Code in a monorepo or large codebase
Claude Code CLI · in the page
large-codebases
…ditionalDirectories` setting | Never | 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 added wit…
Connect Claude Code to tools via MCP
Claude Code CLI · in the page
mcp
…permissions.md#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. Th…
Choose a permission mode
Claude Code CLI · in the page
permission-modes
…n mode. To let Claude read such a path later, add its directory with `/add-dir` or remove the setting. * **No, and ask again next time**: the read is refused, and the next read outside the working dir…
Configure permissions
Claude Code CLI · in the page
permissions
…rking-directories) describes. Reads under a drive you add later with `/add-dir`, or list in `additionalDirectories` in a settings file, still prompt. To stop those prompts for a share mapped to `Z:`,…
Configure the sandboxed Bash tool
Claude Code CLI · in the page
sandboxing
…l-directories-grant-file-access-not-configuration) with `--add-dir`, `/add-dir`, or `permissions.additionalDirectories`. The first time a command needs a new network domain, Claude Code prompts for a…
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…
All settings
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
…`/` menu and you can't invoke them by name. To load them sooner, run `/add-dir` with the subdirectory's path, which requires Claude Code v2.1.257 or later. For a worktree session that you start from t…
Customize your status line
Claude Code CLI · in the page
statusline
…ession | | `workspace.added_dirs` | Additional directories added via `/add-dir` or `--add-dir`. Empty array if none have been added | | `workspace.git_worktree` | Git worktree name when the current di…
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
…s/en/permissions.md#working-directories) you added with `--add-dir`, `/add-dir`, or `additionalDirectories` in settings. This includes commands Claude runs in response to your later messages. * Suba…
Week 28 · July 6–10, 2026
Claude Code CLI · in the page
whats-new/2026-w28
…from context`/cd` now suggests directory paths as you type, matching `/add-dir``/commit-push-pr` auto-allows `git push` to the repo's configured push remote in addition to `origin`Gateway: `/login` no…
Week 34 · August 17–21, 2026
Claude Code CLI · in the page
whats-new/2026-w34
…pen [`/permissions`](/docs/en/permissions#manage-permissions) or run `/add-dir <path>` while Claude is working; permission rule changes apply to the rest of the current turnWhen background tasks keep…
Orchestrate subagents at scale with dynamic workflows
Claude Code CLI · in the page
workflows
…script kept outside your working directory, add its directory with [`/add-dir`](/docs/en/permissions#working-directories) or a [Read allow rule](/docs/en/permissions.md#read-and-edit) first. The run…