{"version":"2.1.281","anchor":"sdkstructured-io-internals-first-turn-gate-prompt-settle","canonical_anchor":"sdkstructured-io-internals-first-turn-gate-prompt-settle","heading":"SDK\/structured-IO internals: first-turn gate, prompt settle refactor, nested-chain cleanup","tier":"internal","area":"SDK","url":"https:\/\/changelogs.core-directive.com\/v\/2.1.281\/e\/sdkstructured-io-internals-first-turn-gate-prompt-settle","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.281","markdown":"### SDK\/structured-IO internals: first-turn gate, prompt settle refactor, nested-chain cleanup\n\nInternal changes to how SDK messages, prompts and session state are handled, including a new firstTurnGate option that does nothing by default\n\n**Unclear.** The finding does not say what `firstTurnGate` holds back or what turns it on.\n\n**What**\n\nSeveral internal parts of how Claude Code exchanges messages with programs that drive it were reorganised:\n\n- `firstTurnGate` is a new option on the incoming message handler, and it does nothing unless something turns it on.\n\n- The cleanup step after a user dialog now runs through a single `settlePublishedPrompt` step.\n\n- Removing a nested chain from session state now goes through one `removeChain` step, and state change notices are sent through a helper meant to avoid errors.\n\n- Governed git now works out whether a `hooksPath` is configured.\n\n- Artifact calls now clean up their session state even when they fail.\n\n**Why**\n\nThese are mostly tidy-ups, with no visible change for most people using Claude Code.\n\n- Area: SDK\n- Tier: Under the hood\n- Useful: 1\/5\n- Signal: 1\/5"}