{"version":"2.1.317","anchor":"new-initialize-not-first-startup-refusal-for-await-initial","canonical_anchor":"new-initialize-not-first-startup-refusal-for-await-initial","heading":"Clearer errors when --await-initialize does not get the initialize request first","tier":"notice","area":"SDK","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.317\/e\/new-initialize-not-first-startup-refusal-for-await-initial","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.317","markdown":"### Clearer errors when --await-initialize does not get the initialize request first\n\nPrograms using --await-initialize now get a distinct initialize_not_first refusal and a cause field saying what went wrong\n\n**What**\n\n`--await-initialize` is a startup option for programs that drive Claude Code through the SDK (the toolkit for building on Claude Code). With it, Claude Code expects an `initialize` control request as the first line of standard input, which is the text a program feeds into it. The errors for getting this wrong are now more specific:\n\n- `initialize_not_first`: a new startup refusal reason. It is used when the first line is not the initialize request. The schema text says to fix the host program or wrapper script rather than retry.\n\n- `cause: \"first_line\"`: the error for a wrong first line now includes this field. It is also added when the first line is not valid JSON, next to the existing message.\n\n- `cause: \"plugins\"`: the error for a malformed `initialize.plugins` value now includes this field.\n\n**Why**\n\nA program driving Claude Code can now tell these failures apart and show an error that points at the real problem. Retrying with the same broken setup will not help.\n\n- Area: SDK\n- Tier: You'll notice\n- Useful: 2\/5\n- Signal: 1\/5\n- Scope: individual\n- Heads-up: no"}