{"version":"2.1.281","anchor":"shell-exec-options-pass-through-waitforexitafterkill","canonical_anchor":"shell-exec-options-pass-through-waitforexitafterkill","heading":"Internal changes to tool execution: memory sampling and a waitForExitAfterKill option","tier":"internal","area":"Elsewhere","url":"https:\/\/changelogs.core-directive.com\/v\/2.1.281\/e\/shell-exec-options-pass-through-waitforexitafterkill","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.281","markdown":"### Internal changes to tool execution: memory sampling and a waitForExitAfterKill option\n\nTool calls now sample memory through a sampler, and the command runner gains a waitForExitAfterKill option, plus small internal tweaks\n\n**Unclear.** The finding does not say who sets `waitForExitAfterKill` or what it changes when a command is stopped.\n\n**What**\n\nSeveral internal changes to how Claude Code runs tools (the actions Claude takes, such as running a command or editing a file) and shell commands:\n\n- Memory use around each tool call is now taken from a sampler, with `sample(\"before_call\")`, `sample(\"after_call\")` and `sample(\"after_throw\")`. Before, it called `process.memoryUsage()` and computed rss, heap and external memory changes. The usage reports for tool success and error use the sampler's fields. Success reports also get fields describing the shape of the tool's result.\n\n- The helper that runs processes has a new option, `waitForExitAfterKill`, which is off by default. The exec wrapper passes it through.\n\n- The updater for background jobs still in progress gains an `includeSettled` option.\n\n- The parser for artifact conflict records no longer rejects records for one extra condition.\n\n- The bridge and CCR heartbeat gates are unchanged apart from renamed internals.\n\n**Why**\n\nThese are mostly internal. Memory is no longer measured directly on every tool call. `waitForExitAfterKill` may help avoid stray output after a command that was stopped for taking too long.\n\n- Area: Elsewhere\n- Tier: Under the hood\n- Useful: 1\/5\n- Signal: 0\/5"}