{"version":"2.1.323","anchor":"sdk-can-deliver-managed-settings-through-the-initialize-requ","canonical_anchor":"sdk-can-deliver-managed-settings-through-the-initialize-requ","heading":"SDK hosts can send managed settings in the initialize request","tier":"use","area":"SDK","scope":"org","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.323\/e\/sdk-can-deliver-managed-settings-through-the-initialize-requ","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.323","markdown":"### SDK hosts can send managed settings in the initialize request\n\nNew --managed-settings-in-initialize lets SDK hosts send managed settings over the first initialize request, and Claude Code refuses to start without them\n\n**What**\n\nManaged settings are settings an organization enforces on Claude Code. The SDK (the library for running Claude Code from other programs) can now send them inside the initialize request, the first message it sends to Claude Code, instead of as a command-line argument.\n\n- The SDK process transport has a new `managedSettingsViaInitialize` option. When it is set, Claude Code is started with `--managed-settings-in-initialize`, and in some cases also `--await-initialize`. Otherwise the older `--managed-settings` path is used. The members do not show what decides when `--await-initialize` is added.\n\n- `--managed-settings-in-initialize` is a new command-line flag. It requires `--await-initialize` and `--input-format=stream-json` with input piped in. Claude Code reads the managed settings from the first initialize request and applies them.\n\n- The flag errors out if combined with `--managed-settings`, `--sdk-url` or a subcommand, or if no usable initialize request arrives.\n\n- A new startup refusal code, `managed_settings_not_delivered`, is used when Claude Code cannot use the managed settings carried in the initialize request. No session starts without those settings.\n\n- The initialize reply gains `managed_settings_applied`, marked @internal. A host that sends managed settings must send no prompt until this value is true.\n\n- When managed settings are set, the SDK starts a timeout waiting for the initialize reply. If it runs out, the prompt is not sent and the error says the managed settings could not be confirmed and the prompt was not sent. Before, only a hook set to block did this.\n\n- When managed settings are set, every control request type not on an exempt list is held back behind the prompt hold. Before, only a fixed set of types was held.\n\n- New capability names `sdk_managed_settings_in_initialize` and `sdk_drop_hook_matchers` were added.\n\n**Why**\n\nOrganization settings can reach an embedded Claude Code over its input stream. If they fail to arrive, Claude Code refuses to start rather than running without them, and no prompt is sent until they are confirmed as applied.\n\n- Area: SDK\n- Names: `managedSettingsViaInitialize`\n- Tier: Use it now\n- Useful: 5\/5\n- Signal: 2\/5\n- Scope: org\n- Heads-up: no"}