{"version":"2.1.315","anchor":"process-tree-reaper-on-session-shutdown-gated-by-tengu-tidy","canonical_anchor":"process-tree-reaper-on-session-shutdown-gated-by-tengu-tidy","heading":"Leftover background processes are cleaned up when a session ends on Linux","tier":"notice","area":"Background Tasks","scope":"individual","heads_up":true,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.315\/e\/process-tree-reaper-on-session-shutdown-gated-by-tengu-tidy","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.315","markdown":"### Leftover background processes are cleaned up when a session ends on Linux\n\nOn Linux, Claude Code now finds processes left behind by tasks when a session shuts down, asks them to stop, then force-stops any still running\n\n**What**\n\nWhen a session (one run of Claude Code) shuts down, Claude Code can now clean up processes that its tasks left behind. A task can start other programs, and those programs can start more. Claude Code now tracks down these child processes and process groups and stops them in two steps:\n\n- It first sends each one a polite request to stop (`SIGTERM`).\n\n- After a short grace period, it force-stops any that are still running (`SIGKILL`).\n\nThis works only on Linux, because it finds the processes by reading the system's `\/proc` directory. The cleanup is controlled by a setting Anthropic can change from its servers. When the servers send nothing, or the lookup fails, it falls back to on.\n\n**Why**\n\nBackground tasks and the programs they started are more likely to be stopped when a session ends, instead of being left running on your machine with nothing watching them.\n\n- Flag `tengu_tidy_lantern`: Not enough to say (read for one account on one subscription tier against v2.1.315; this account: no value returned, anonymous baseline: no value returned, compiled default: 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.\n- Area: Background Tasks\n- Tier: You'll notice\n- Useful: 3\/5\n- Signal: 3\/5\n- Scope: individual\n- Heads-up: yes"}