{"version":"2.1.315","anchor":"shell-exit-sweep-kills-leftover-process-trees-on-exit","canonical_anchor":"shell-exit-sweep-kills-leftover-process-trees-on-exit","heading":"Leftover shell processes are force-stopped when Claude Code exits","tier":"notice","area":"Background Tasks","scope":"individual","heads_up":true,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.315\/e\/shell-exit-sweep-kills-leftover-process-trees-on-exit","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.315","markdown":"### Leftover shell processes are force-stopped when Claude Code exits\n\nOn exit, Claude Code now force-stops shell commands and process trees still running after a grace period, except on Windows\n\n**Unclear.** Apart from never running on Windows, what decides whether this cleanup is switched on is not clear.\n\n**What**\n\nWhen Claude Code exits, it now cleans up shell commands that are still running and process trees it was already stopping. A process tree is a command together with every program it started. After a grace period, anything left is force-stopped, and Claude Code logs what it did. Force-stopping means sending SIGKILL, the signal that ends a program immediately.\n\nA command moved to the background can be marked to be left running at exit instead. This cleanup is not installed on Windows.\n\n**Why**\n\nFewer stray programs keep running after Claude Code closes.\n\n- Area: Background Tasks\n- Tier: You'll notice\n- Useful: 3\/5\n- Signal: 2\/5\n- Scope: individual\n- Heads-up: yes"}