{"version":"2.1.281","anchor":"sdk-query-tighter-control-request-lifecycle-and-remote-tool","canonical_anchor":"sdk-query-tighter-control-request-lifecycle-and-remote-tool","heading":"SDK Query: tighter control-request lifecycle and remote-tool subtypes left unanswered","tier":null,"area":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.281\/e\/sdk-query-tighter-control-request-lifecycle-and-remote-tool","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.281","markdown":"### SDK Query: tighter control-request lifecycle and remote-tool subtypes left unanswered\n\nThe SDK now ignores control requests after close, leaves remote-tool requests unanswered, and logs failed replies and closes\n\n**What**\n\nThe 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:\n\n- Requests that arrive after the session has closed are now skipped.\n\n- A request's cancel handle is removed only if it still belongs to that request.\n\n- Success and error replies share one path, which logs \"Response write failed\" when a reply cannot be sent.\n\n- Requests of type `remote_tool_call`, `remote_plumbing_call`, `remote_tools_probe` and `remote_tools_reannounce` are deliberately left unanswered, because they are meant for the machine serving the session's tools.\n\n- `cleanup()` now logs a failed `transport.close()` instead of silently skipping the rest of shutdown.\n\n- `firstResultReceivedResolve` is no longer called when the stream ends.\n\n**Why**\n\nLate 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."}