{"version":"2.1.312","anchor":"subagent-shell-reaping-condition-extended","canonical_anchor":"subagent-shell-reaping-condition-extended","heading":"More subagents now have their shells cleaned up when they finish","tier":"notice","area":"Subagents","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.312\/e\/subagent-shell-reaping-condition-extended","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.312","markdown":"### More subagents now have their shells cleaned up when they finish\n\nSubagents started through a 'call' path are flagged reapsShellsUnlessMoved, so their shells are cleaned up even when they run in the background\n\n**Unclear.** Which subagents carry the setting to clean up their shells unless moved is not stated.\n\n**What**\n\nA subagent is a helper agent that Claude starts to work on part of a task. A subagent can start shells, the command-line processes it runs commands in. Claude Code decides whether to reap a subagent's shells, meaning shut them down, using a check.\n\n- Before, the check matched only subagents that were not async, meaning ones Claude waits on instead of running in the background.\n\n- It now also matches subagents with `reapsShellsUnlessMoved` set to true.\n\n- One place sets that field when a subagent is started through a `call` path.\n\n- Subagents started that way are now treated like synchronous ones for this check, even when they run in the background.\n\n**Why**\n\nBackground shells left by some subagents are now cleaned up instead of staying behind. The field's name suggests a shell is kept if it has been moved, so a shell you expect to keep running from such a subagent may now be stopped unless it was moved.\n\n- Area: Subagents\n- Tier: You'll notice\n- Useful: 2\/5\n- Signal: 1\/5\n- Scope: individual\n- Heads-up: no"}