{"version":"2.1.246","anchor":"per-task-stop-is-first-attached-client-wins-and-does-not-sur","canonical_anchor":"per-task-stop-is-first-attached-client-wins-and-does-not-sur","heading":"Per-task stop is first-attached-client-wins and does not survive a worker restart","tier":"internal","area":"SDK","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.246\/e\/per-task-stop-is-first-attached-client-wins-and-does-not-sur","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.246","markdown":"### Per-task stop is first-attached-client-wins and does not survive a worker restart\n\nThe first client to attach decides per-task stop behaviour, and it is lost on worker restart.\n\n**What**\n\nThe `perTaskStopAffordance` declaration is stored on a per-surface capability latch: the first client to attach sets it, and later clients cannot change it. Across worker restarts it is classified as `\"lost\"` rather than restored, so a reconnecting client must declare it again or interrupts go back to killing background tasks.\n\n**Details**\n\n- Plumbed through the initialize config and the control-request handshake.\n- Any SDK consumer on this build can reach it by setting the field; no remote flag gates it.\n\n**Evidence**\n\n`Declares that this consumer renders a per-task stop control wired to the `stop_task` control request`, `perTaskStopAffordance`\n\n- Area: SDK\n- Names: `perTaskStopAffordance`\n- Tier: Under the hood\n- Useful: 2\/5\n- Signal: 3\/5"}