{"version":"2.1.336","anchor":"sdk-initialize-accepts-additionaldirectories-reports-additi","canonical_anchor":"sdk-initialize-accepts-additionaldirectories-reports-additi","heading":"SDK hosts can send extra working directories in the initialize message","tier":"use","area":"SDK","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.336\/e\/sdk-initialize-accepts-additionaldirectories-reports-additi","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.336","markdown":"### SDK hosts can send extra working directories in the initialize message\n\nWith `--initialize-fields=additionalDirectories`, SDK hosts can send extra folders at initialize instead of `--add-dir`, and get `additional_directories_applied` back\n\n**What**\n\nPrograms that embed Claude Code through the Agent SDK can start it with `--await-initialize` and send settings in an initialize message instead of on the command line. That message can now carry `additionalDirectories`, the extra working folders Claude may read and edit, when Claude Code is started with `--initialize-fields=additionalDirectories`.\n\n- Each entry is applied like one `--add-dir`, which keeps the launch command short. A folder that does not exist is passed over.\n\n- The field must be a list of text values. Otherwise Claude Code exits with code 1 and the error `Error: --initialize-fields=${y} requires initialize.${y} to be a list of strings.`, the same template now used for `disallowedTools`.\n\n- It cannot be combined with `--add-dir`: `Error: --initialize-fields=additionalDirectories cannot be used with --add-dir.` The `initialize_fields_not_delivered` description now names \"the settings, disallowedTools or additionalDirectories that it names\" and counts `--add-dir` alongside as a conflict.\n\n- The initialize reply gains `additional_directories_applied`. True means the list was taken, not that each folder in it exists.\n\n- If the folders were sent and Claude Code does not confirm them, the session ends and the prompt is withheld. The error mentions `additionalDirectoriesDelivery` 'argv' and now says generically that 'the values sent in it could not be confirmed'.\n\n- The help text for `--initialize-fields` lists `additionalDirectories` (read in place of `--add-dir`) next to settings and `disallowedTools`.\n\n- `mcp_servers_applied` and `code_running_mcp_tools_applied` in the reply now each have their own value. Before, `mcp_servers_applied` followed the same value as `settings_applied`.\n\nAlso in this release, permission requests sent only to the editor extension panel gain `no_sandbox`, true for display when a Bash or PowerShell command sets `dangerouslyDisableSandbox` and no sandbox (a walled-off area limiting what commands can touch) was running, and `tool_warning`, text from Claude Code's own tools about what answering Yes can cost, such as discarded worktree work.\n\n**Why**\n\nA host can hand over many folders without a long command line, and it gets a clear answer on whether the list was taken, with `mcp_servers_applied` now reported correctly on its own.\n\n- Area: SDK\n- Names: `additionalDirectories`, `--add-dir`\n- Tier: Use it now\n- Useful: 5\/5\n- Signal: 2\/5\n- Scope: individual\n- Heads-up: no"}