{"version":"2.1.234","anchor":"control-protocol-schema-now-documents-itself","canonical_anchor":"control-protocol-schema-now-documents-itself","heading":"Control protocol schema now documents itself","tier":"internal","area":"SDK","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.234\/e\/control-protocol-schema-now-documents-itself","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.234","markdown":"### Control protocol schema now documents itself\n\nThe SDK's control protocol schema now describes its own message types, so client authors can read it directly.\n\n**What**\n\nThe stream-json control protocol used by the SDK now carries full descriptions of its own wire contract, so anyone building a client against Claude Code can read the schema instead of inferring behaviour from traffic. No behaviour changed in this build; every message type, direction and success payload that was already there is simply now explained.\n\n**Details**\n\n- Request ids are documented as chosen by the sender and echoed back on the response, and hook callback ids follow the same client-chosen round trip.\n- A late `initialize` from a client joining a session already in progress is answered with the current state rather than repeating one-time setup.\n- Closing the stream is documented as telling the CLI to finish the current turn and exit.\n- User, assistant and stream-event messages are described in terms of the Anthropic Messages API rather than being left as undocumented pass-throughs.\n- MCP messages are documented as flowing in both directions, and responses gained a success payload.\n- Success payloads were added for setting permission mode, which echoes the mode back, for registering a repo root, which returns the resolved absolute path, and for background tasks, which return a `backgrounded` boolean when a tool use id was named.\n- Cancel-request and keep-alive gained prose on who is allowed to send them and what a receiver must do on arrival, with the keep-alive described as a liveness heartbeat carrying no payload.\n\n**Evidence**\n\n`Liveness heartbeat with no payload.`, `Closing the stream tells the CLI to finish the current turn and exit.`\n\n- Area: SDK\n- Tier: Under the hood\n- Useful: 2\/5\n- Signal: 2\/5"}