{"name":"DirectoryAdded","slug":"directoryadded","family":"hook","title":"Hook events","noun":"hook event","description":"When a working directory is added mid-session via `\/add-dir` or the SDK `register_repo_root` control request","description_source":"docs","described_by":{"doc":"claude-code\/hooks","title":"Hooks reference"},"presence":{"first_seen":null,"removed_in":null,"in_current_build":false,"newest_mined":"2.1.308","builds":0,"mined_builds":149,"first_cited":null},"aliases":[],"entries":[{"version":"2.1.229","anchor":"hooks-are-handed-a-session-object-instead-of-reading-globals","heading":"Hooks are handed a session object instead of reading globals","line":"Hooks now get an explicit session with id, working directory and project root instead of guessing from globals.","released_at":"2026-08-12 19:28:48","reason":"found in this entry's text"},{"version":"2.1.219","anchor":"register-repo-root-accepts-launch-time-roots-and-rejects-dup","heading":"register_repo_root accepts launch-time roots and rejects duplicates","line":"Registering a repo root now accepts launch-time --add-dir roots and clearly rejects duplicates or bad paths.","released_at":"2026-07-24 16:11:49","reason":"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":"2.1.219","anchor":"register-repo-root-accepts-launch-time-directories-and-rejec","heading":"register_repo_root accepts launch-time directories and rejects duplicates","line":"You can register repo roots under any directory passed with --add-dir, and duplicates now say so clearly.","released_at":"2026-07-24 16:11:49","reason":"found in this entry's text"}],"entries_total":4,"docs":[{"source":"claude-code","path":"hooks","title":"Hooks reference","documented":true},{"source":"claude-code","path":"agent-sdk\/hooks","title":"Intercept and control agent behavior with hooks","documented":true},{"source":"claude-code","path":"agent-sdk\/typescript","title":"Agent SDK reference - TypeScript","documented":false},{"source":"claude-code","path":"commands","title":"Commands","documented":false},{"source":"claude-code","path":"hooks-guide","title":"Automate actions with hooks","documented":false}],"docs_total":5,"gates":[],"related":[],"url":"https:\/\/changelogs.core-directive.com\/reference\/hook\/directoryadded","family_url":"https:\/\/changelogs.core-directive.com\/reference\/hook.json"}