{"version":"2.1.321","anchor":"stop-request-can-spare-background-tasks","canonical_anchor":"stop-request-can-spare-background-tasks","heading":"Stopping a turn can leave background tasks running","tier":"use","area":"SDK","scope":"individual","heads_up":true,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.321\/e\/stop-request-can-spare-background-tasks","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.321","markdown":"### Stopping a turn can leave background tasks running\n\nA stop, cancel or Esc can now end the current turn without stopping running background agents and workflows\n\n**What**\n\nA turn is one round of Claude working on your request. Background tasks are agents and workflows that keep running on their own while you continue.\n\n- The Stop request gains an optional `spare_background_tasks` setting. When true, it ends the turn and leaves background agents and workflows running. Running observers still stop.\n\n- Cancelling a remote session can pass `spareBackgroundTasks`, so agents are recorded as finished rather than as stopped by you.\n\n- Pressing Esc in the local interface now passes `spareBackgroundTasks`, so interrupting a turn should not kill background tasks.\n\n- In headless mode (running without the interactive screen), a stop not made by a person leaves background tasks unmarked, behind the switch `tengu_swift_bear`. When `spare_background_tasks` is set, a person's stop no longer counts against background tasks either.\n\n**Why**\n\nYou can stop Claude's current answer without losing work running in the background, and tools built on Claude Code get finer control over what an interrupt ends.\n\n- Area: SDK\n- Names: `spare_background_tasks`\n- Tier: Use it now\n- Useful: 4\/5\n- Signal: 2\/5\n- Scope: individual\n- Heads-up: yes"}