{"version":"2.1.281","anchor":"sdk-remote-control-failures-carry-a-failure-kind-and-contr","canonical_anchor":"sdk-remote-control-failures-carry-a-failure-kind-and-contr","heading":"SDK Remote Control: failures carry a failure_kind, and control errors gain an error_code","tier":null,"area":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.281\/e\/sdk-remote-control-failures-carry-a-failure-kind-and-contr","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.281","markdown":"### SDK Remote Control: failures carry a failure_kind, and control errors gain an error_code\n\nSDK Remote Control failures now report a `failure_kind`, and failed enable requests return an `error_code` such as `remote_control_policy_disabled`\n\n**Unclear.** The finding does not say what `getBackfillMessages` supplies or which other `failure_kind` values exist.\n\n**What**\n\nIn SDK and headless mode (Claude Code run by another program, with no one at the screen), Remote Control failures now carry a machine-readable reason:\n\n- `failure_kind` is added to a `system\/bridge_state` message whose state is \"failed\", and is \"terminal\" when no kind was reported.\n\n- `error_code` is added to the error returned when a `remote_control` enable request fails, for example `remote_control_policy_disabled`.\n\nThe list of error codes also documents codes for refused `set_model` and `set_permission_mode` requests. The Remote Control connection is now started with `remoteControlOrigin` set to \"sdk\" and a `getBackfillMessages` callback.\n\n**Why**\n\nA program driving Claude Code can now tell why Remote Control could not be turned on, such as an organisation policy forbidding it, and react to that code instead of reading an error message."}