{"name":"--add-dir","slug":"add-dir","family":"cli","title":"CLI flags","noun":"CLI flag","description":"Add additional working directories for Claude to read and edit files. Grants file access; Claude Code [doesn't discover](\/docs\/en\/permissions#additional-directories-grant-file-access-not-configuration) most `.claude\/` configuration from these directories. Validates that each path exists as a directory. You can't add most [network paths](\/docs\/en\/errors#working-directory-is-a-network-path), such as `\\\\server\\share`. To persist these directories across sessions, set [`permissions.additionalDirectories`](\/docs\/en\/settings-reference#permissions-additionaldirectories) in settings","description_source":"docs","described_by":{"doc":"claude-code\/cli-reference","title":"CLI reference"},"presence":{"first_seen":"2.1.138","removed_in":null,"in_current_build":true,"newest_mined":"2.1.309","builds":150,"mined_builds":150,"first_cited":{"version":"2.1.219","released_at":"2026-07-24 16:11:49","spans":6}},"aliases":[],"entries":[{"version":"2.1.309","anchor":"self-hosted-runner-treats-code-review-sessions-specially-to","heading":"Self-hosted runners handle code review sessions more strictly","line":"Self-hosted runners now refuse code reviews in some setups, run them without local settings, and pass their tokens outside the environment","released_at":"2026-10-22 20:34:13","reason":"found in this entry's text"},{"version":"2.1.301","anchor":"systeminit-now-reports-original-cwd-and-additional-director","heading":"SDK start-up message now lists the session's permission folder and added folders","line":"The message an SDK session sends at start-up can now include the folder permission checks start from and any added working folders","released_at":"2026-10-15 14:34:23","reason":"found in this entry's text"},{"version":"2.1.295","anchor":"additional-directory-claudemd-no-longer-read-in-this-memory","heading":"One memory file scan now looks only at managed and user CLAUDE.md files","line":"One of Claude Code's memory file scans no longer includes project, local or `--add-dir` CLAUDE.md files, only managed and user ones","released_at":"2026-10-08 18:22:58","reason":"found in this entry's text"},{"version":"2.1.292","anchor":"plugin-remove-message-for-unreadable-add-dir-settings","heading":"Plugin removal hint for settings behind a link to another machine","line":"When plugin removal cannot read settings from an --add-dir folder, the message now suggests replacing a link to another machine with a real folder","released_at":"2026-10-06 17:10:31","reason":"found in this entry's text, named in this entry"},{"version":"2.1.287","anchor":"auto-update-source-attribution-skips-managed-policy-case","heading":"Auto-update setting no longer credited to an added directory under organization policy","line":"When an organization policy supplies the auto-update setting, Claude Code no longer says it came from an `--add-dir` directory's settings","released_at":"2026-10-01 16:59:25","reason":"found in this entry's text, named in this entry"},{"version":"2.1.287","anchor":"add-dir-rejection-message-now-refers-to-the-sessions-workin","heading":"The --add-dir rejection message now names the session's working directory","line":"A directory outside the allowed area is now rejected with wording about the session's working directory instead of \"cwd\"","released_at":"2026-10-01 16:59:25","reason":"found in this entry's text, named in this entry"},{"version":"2.1.287","anchor":"plugin-directory-reserved-name-marketplace-entry-removal-an","heading":"Removing a reserved-name plugin marketplace entry now turns its plugins off safely","line":"`claude plugin marketplace remove` now turns off affected plugins first, and plugin settings and secrets are copied when you switch plugins","released_at":"2026-10-01 16:59:25","reason":"found in this entry's text"},{"version":"2.1.287","anchor":"marketplace-autoupdate-taken-only-from-trusted-settings-for","heading":"Project settings can no longer change auto-update for the official marketplace","line":"Auto-update for the official plugin marketplace is now read only from user, `--settings` and managed settings, not from project files","released_at":"2026-10-01 16:59:25","reason":"found in this entry's text"},{"version":"2.1.284","anchor":"symlinked-clauderules-that-point-outside-the-project-now-n","heading":"A project rules folder that links outside the project now needs your approval","line":"If a project's `.claude\/rules` folder is a link to a place outside the project, its rules load only when external includes are allowed or approved","released_at":"2026-09-28 17:11:59","reason":"found in this entry's text"},{"version":"2.1.282","anchor":"allowmanagedpermissionrulesonly-now-also-ignores-allowed","heading":"Managed-only permission rules now also cover skills' allowed-tools lists","line":"With `allowManagedPermissionRulesOnly` on, user and project skills and commands can no longer grant themselves tools through `allowed-tools`","released_at":"2026-09-24 15:56:22","reason":"found in this entry's text"}],"entries_total":27,"docs":[{"source":"claude-code","path":"cli-reference","title":"CLI reference","documented":true},{"source":"claude-code","path":"agent-sdk\/claude-code-features","title":"Use Claude Code features in the SDK","documented":false},{"source":"claude-code","path":"agent-sdk\/python","title":"Agent SDK reference - Python","documented":false},{"source":"claude-code","path":"agent-sdk\/skills","title":"Extend agents with skills","documented":false},{"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-teams","title":"Orchestrate teams of Claude Code sessions","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}],"docs_total":13,"gates":[],"related":[],"url":"https:\/\/changelogs.core-directive.com\/reference\/cli\/add-dir","family_url":"https:\/\/changelogs.core-directive.com\/reference\/cli.json"}