What
Programs 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.
- Each entry is applied like one
--add-dir, which keeps the launch command short. A folder that does not exist is passed over. - 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 fordisallowedTools. - It cannot be combined with
--add-dir:Error: --initialize-fields=additionalDirectories cannot be used with --add-dir.Theinitialize_fields_not_delivereddescription now names "the settings, disallowedTools or additionalDirectories that it names" and counts--add-diralongside as a conflict. - The initialize reply gains
additional_directories_applied. True means the list was taken, not that each folder in it exists. - 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'. - The help text for
--initialize-fieldslistsadditionalDirectories(read in place of--add-dir) next to settings anddisallowedTools. mcp_servers_appliedandcode_running_mcp_tools_appliedin the reply now each have their own value. Before,mcp_servers_appliedfollowed the same value assettings_applied.
Also 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.
Why
A 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.
Changed answering No at the startup --add-dir trust prompt to start the session without that directory in most cases instead of exiting; Esc…