What
When Claude Code restarts itself, the new process now receives the extra working directories from the old one. These are the directories added with --add-dir, the option that lets Claude read and edit files outside the folder you started in. They are passed through the new process's environment, meaning the settings a program inherits when it starts.
Why
After a restart, Claude keeps access to the same extra directories, so you do not have to add them again.
Names in the bundle--add-dir
The entry above is what we published on the day. These lines were added later, as Anthropic's own pages caught up, and they sit beside the original rather than replacing it.
Added since
A small documentation edit on CLI reference touched a line naming --add-dir after this was published.
| `--bare` | Minimal mode: skip auto-discovery of hooks, skills, custom commands, subagents, installed plugins, MCP servers, auto memory, and CLAUDE.md so scripted calls start faster. Skills in a directory you pass with `--add-dir` still l…cli-reference see the edit
Confirmed since
Anthropic's documentation has since written up --add-dir, on Claude Code changelog.
* Fixed repository, user and `--add-dir` skills, commands and skills-directory plugin manifests pre-approving their own tools via `allowed-tools` under managed `allowManagedPermissionRulesOnly`changelog see the edit
Two sources agreeTwo things we can check say the same as this entry.
Anthropic's documentation agrees
Anthropic's documentation has since written up --add-dir, on Claude Code changelog.
Anthropic's release notes agree
Fixed CLAUDE.md and rules files from an --add-dir directory inside the working directory being sent to the model twice in headless and SDK…