{"version":"2.1.333","anchor":"claude-code-await-first-message-holds-a-processs-own-queued","canonical_anchor":"claude-code-await-first-message-holds-a-processs-own-queued","heading":"New setting makes Claude Code wait for the host's first message before starting","tier":"use","area":"SDK","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.333\/e\/claude-code-await-first-message-holds-a-processs-own-queued","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.333","markdown":"### New setting makes Claude Code wait for the host's first message before starting\n\nWith `CLAUDE_CODE_AWAIT_FIRST_MESSAGE` set, Claude Code holds turns it queued for itself until the host program sends its first message\n\n**What**\n\nSome programs run Claude Code inside themselves, for example through the SDK. Such a program is called the host here. Claude Code can queue up messages for itself, which would make it start a turn (a round of work) on its own.\n\nWhen the environment variable `CLAUDE_CODE_AWAIT_FIRST_MESSAGE` is set, Claude Code keeps those self-queued messages back. It releases them once the host has sent its first message. It also logs how many messages it kept.\n\n**Why**\n\nA host that embeds Claude Code, including one resuming an earlier session, can be sure Claude Code does not start working on its own before the host has said anything.\n\n- Area: SDK\n- Tier: Use it now\n- Useful: 4\/5\n- Signal: 3\/5\n- Scope: individual\n- Heads-up: no"}