The SDK's control protocol schema now describes its own message types, so client authors can read it directly.
What's wrong with this entry?
The 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.
- 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.
- A late
initializefrom a client joining a session already in progress is answered with the current state rather than repeating one-time setup. - Closing the stream is documented as telling the CLI to finish the current turn and exit.
- User, assistant and stream-event messages are described in terms of the Anthropic Messages API rather than being left as undocumented pass-throughs.
- MCP messages are documented as flowing in both directions, and responses gained a success payload.
- 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
backgroundedboolean when a tool use id was named. - 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.
Liveness heartbeat with no payload., Closing the stream tells the CLI to finish the current turn and exit.
Strings lifted out of the shipped bundle, so the claim above can be checked against them.