Search the documentation
7 pages for directoryadded.
Titles and paths first, then pages whose text carries it. Each row opens that page as this site last read it.
Intercept and control agent behavior with hooks
Claude Code CLI · in the page
agent-sdk/hooks
…| | `DirectoryAdded` | No | Yes | A working directory is added during a sessio…
Agent SDK reference - TypeScript
Claude Code CLI · in the page
agent-sdk/typescript
…ed" | "Elicitation" | "ElicitationResult" | "ConfigChange" | "DirectoryAdded" | "WorktreeCreate" | "WorktreeRemove" | "InstructionsLoaded" | "CwdChanged" | "FileChanged" | "Message…
Claude Code changelog
Claude Code CLI · in the page
changelog
…allowlisted hosts for sandboxed commands without prompting * Added `DirectoryAdded` hook that fires after `/add-dir` or the SDK `register_repo_root` control request registers a new working directory…
Commands
Claude Code CLI · in the page
commands
…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…
Hooks reference
Claude Code CLI · in the page
hooks
…ation, ConfigChange, InstructionsLoaded, CwdChanged, FileChanged, and DirectoryAdded as standalone async events, and MessageDisplay as a display-only event that runs while assistant message text strea…
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 reques…
Plugins reference
Claude Code CLI · in the page
plugins-reference
…| | `DirectoryAdded` | When a working directory is added mid-session via `/add-dir` or the SDK `register_repo_root` control reques…