{"version":"2.1.251","anchor":"sdk-plumbing-for-refreshing-a-background-session-s-work-secr","canonical_anchor":"sdk-plumbing-for-refreshing-a-background-session-s-work-secr","heading":"SDK plumbing for refreshing a background session's work secret","tier":"soon","area":"SDK","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.251\/e\/sdk-plumbing-for-refreshing-a-background-session-s-work-secr","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.251","markdown":"### SDK plumbing for refreshing a background session's work secret\n\nThe SDK can refresh a background session's credential, but only if the host provides a callback.\n\n**What**\n\nThe SDK's query layer now handles a control request that asks the host to refresh the credential a background session uses when driven by remote control, and there is a matching caller that sends it end to end. It is complete rather than a stub, but only works if the SDK host supplies the refresh callback; otherwise the request throws \"refreshWorkSecret callback is not provided.\"\n\n**Details**\n\n- The query object tracks the host-supplied callback plus a counter of remote-control calls, so repeat refreshes can be told apart.\n- Nothing in normal interactive use reaches this path; it exists for hosts embedding Claude Code with background remote-controlled sessions.\n\n**Evidence**\n\n`remote_control_work_secret`\n\n- Area: SDK\n- Tier: Nothing to try yet\n- Useful: 2\/5\n- Signal: 4\/5\n- Present in the build but not switched on"}