{"version":"2.1.323","anchor":"ccr-added-directories-restored-across-worker-restarts","canonical_anchor":"ccr-added-directories-restored-across-worker-restarts","heading":"Remote sessions reattach added folders after a restart","tier":"use","area":"Sessions","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.323\/e\/ccr-added-directories-restored-across-worker-restarts","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.323","markdown":"### Remote sessions reattach added folders after a restart\n\nIn remote sessions, folders added with add_directory are saved and attached again when the session restarts, if an environment variable is set\n\n**Unclear.** It is not clear whether a server-side switch also controls this restore.\n\n**What**\n\nIn remote sessions that run in the cloud, the folders you added to a session are now saved with the session and attached again when the worker running it restarts. This only works when `CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD` is set in the container's environment, the variable that makes Claude Code load memory files from directories added with `--add-dir`.\n\nWhen it is not set, adding a folder fails with an error saying that `add_directory` requires `CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD` to be set. If the folders cannot be attached again at a start, they stay listed and Claude Code tries again at the next start.\n\n**Why**\n\nA remote session no longer loses folders you added to it just because its worker was restarted.\n\n- Flag `tengu_twinkly_whale`: Off in both readings (read for one account on one subscription tier against v2.1.323; this account: off, anonymous baseline: off, compiled default: off) These values were read against a different version of Claude Code, so treat them as the nearest reading available instead of one taken on this release.\n- Area: Sessions\n- Names: `CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD`, `--add-dir`\n- Tier: Use it now\n- Useful: 3\/5\n- Signal: 2\/5\n- Scope: individual\n- Heads-up: no"}