{"version":"2.1.326","anchor":"bash-sandbox-leftover-process-cleanup-when-an-agent-stops","canonical_anchor":"bash-sandbox-leftover-process-cleanup-when-an-agent-stops","heading":"Shell processes left behind by a stopped agent can be cleaned up","tier":"soon","area":"Subagents","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.326\/e\/bash-sandbox-leftover-process-cleanup-when-an-agent-stops","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.326","markdown":"### Shell processes left behind by a stopped agent can be cleaned up\n\nClaude Code can now find shell processes that outlive a stopped agent and end them, but this is off unless switched on remotely\n\n**Unclear.** It is not clear whether the watcher for leftover bwrap sandboxes is also behind the remote switch.\n\n**What**\n\nAn agent is a helper that Claude Code runs to do part of a task. It can start shell processes, which are commands running in the background. Claude Code now has a cleanup for processes that keep running after their agent stops. It finds them by looking through the system's process list, asks them to stop, and then forces them to stop if they do not.\n\nA separate watcher looks for a bwrap sandbox left running and ends it. A sandbox is a walled-off area that limits what a command can touch, and bwrap is the Linux tool Claude Code uses to build one.\n\nThe process cleanup is off unless it is switched on remotely. The flag server returned it as off for this site's account and for the anonymous baseline.\n\n**Why**\n\nWhen this is on, background shells no longer keep running after the agent that started them has been stopped.\n\n- Flag `tengu_snug_crab`: Off in both readings (read for one account on one subscription tier against v2.1.326; this account: off, anonymous baseline: off, compiled default: off) 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.\n- Area: Subagents\n- Names: `tengu_snug_crab`\n- Tier: Nothing to try yet\n- Useful: 2\/5\n- Signal: 3\/5\n- Scope: individual\n- Heads-up: no\n- Present in the build but not switched on"}