Unclear What happens to background tasks after a stop that no person made is not shown.
What
A 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.
- The Stop request gains an optional
spare_background_taskssetting. When true, it ends the turn and leaves background agents and workflows running. Running observers still stop. - Cancelling a remote session can pass
spareBackgroundTasks, so agents are recorded as finished rather than as stopped by you. - Pressing Esc in the local interface now passes
spareBackgroundTasks, so interrupting a turn should not kill background tasks. - 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. Whenspare_background_tasksis set, a person's stop no longer counts against background tasks either.
Why
You 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.
tengu_swift_bear Not enough to sayNothing here resolved what this flag was doing on this version, so nothing here should be read as on or off.
This account: no value returned · anonymous baseline: no value returned · compiled default in v2.1.321: on
These values were read against a different version of Claude Code, so treat them as the nearest reading available instead of one taken on this release.
Read once, for one account on one subscription tier, against v2.1.321. It isn't a statement about your account. What a flag value here can and cannot tell you
What happens to background tasks after a stop that no person made is not shown.
New in this build: tengu_swift_bear