{"version":"2.1.327","anchor":"initialize-fields-lets-sdk-send-settings-and-disallowedtoo","canonical_anchor":"initialize-fields-lets-sdk-send-settings-and-disallowedtoo","heading":"SDK can send settings and disallowed tools in the initialize request, with a hard failure if they don't arrive","tier":"use","area":"SDK","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.327\/e\/initialize-fields-lets-sdk-send-settings-and-disallowedtoo","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.327","markdown":"### SDK can send settings and disallowed tools in the initialize request, with a hard failure if they don't arrive\n\nNew --initialize-fields and SDK delivery options let settings and disallowedTools travel in the initialize request, and startup refuses if they aren't confirmed\n\n**What**\n\nThe Agent SDK is the toolkit programs use to run Claude Code. When it starts Claude Code, the two exchange an \"initialize\" message before any prompt is sent. Your settings and your deny rules (`disallowedTools`, the list of tools or tool uses Claude is not allowed to make) can now travel in that message instead of on the command line. Before, only managed settings and MCP servers (`managedSettingsDelivery`, `mcpServersDelivery`) could be sent this way.\n\n- `--initialize-fields` is a new CLI flag taking `settings` and\/or `disallowedTools`. It requires `--await-initialize` and stream-json input, and reads the named values from the initialize request instead of from flags. Passing the same value by its own flag too (`--settings`, `--disallowedTools`) is an error.\n\n- The initialize request can now carry a `settings` JSON object and a `disallowedTools` list of strings. Each is checked when named in `--initialize-fields`, and a malformed value returns a violation error.\n\n- `settingsDelivery` and `disallowedToolsDelivery` are new SDK options, set to `'argv'` (the default) or `'initialize'`. Any other value gives \"Invalid settingsDelivery. Expected 'argv' or 'initialize'.\"\n\n- `settingsViaInitialize` and `disallowedToolsViaInitialize` make the SDK add `--initialize-fields`, and the SDK then stops putting `--disallowedTools` on the command line. The check for whether Claude Code reads initialize at startup now counts these options too.\n\n- The initialize response gains `settings_applied` and `disallowed_tools_applied`, which say whether the values sent match the ones taken at launch. A host that sent them must not send a prompt until the value is true.\n\n- If Claude Code does not confirm them, or does not answer initialize at all, the SDK ends the session with an error and the prompt is not sent.\n\n- `initialize_fields_not_delivered` is a new startup refusal reason, alongside `managed_settings_not_delivered`. Claude Code refuses to start when the named fields can't be taken from the initialize request, or when a named field's own flag is also passed.\n\n**Why**\n\nPrograms that run Claude Code can pass settings and deny rules over its input stream instead of the command line. If the values do not arrive, for example against an older Claude Code, the session stops with an error rather than running without your deny rules.\n\n- Area: SDK\n- Tier: Use it now\n- Useful: 4\/5\n- Signal: 4\/5\n- Scope: individual\n- Heads-up: no"}