What
The SDK is the kit for driving Claude Code from another program. Control requests are messages that program sends to steer a running session. Their handling changed in several ways:
- Requests that arrive after the session has closed are now skipped.
- A request's cancel handle is removed only if it still belongs to that request.
- Success and error replies share one path, which logs "Response write failed" when a reply cannot be sent.
- Requests of type
remote_tool_call,remote_plumbing_call,remote_tools_probeandremote_tools_reannounceare deliberately left unanswered, because they are meant for the machine serving the session's tools. cleanup()now logs a failedtransport.close()instead of silently skipping the rest of shutdown.firstResultReceivedResolveis no longer called when the stream ends.
Why
Late requests and failed replies no longer go unnoticed, and shutdown now finishes even when closing the connection fails. Remote-tool requests are left for the machine that serves the tools to answer.