{"version":"2.1.321","anchor":"pkillpgreppidwait-shell-wrappers-gain-ignore-ancestors","canonical_anchor":"pkillpgreppidwait-shell-wrappers-gain-ignore-ancestors","heading":"pkill, pgrep and pidwait wrappers skip the shell's own ancestor processes","tier":"notice","area":"Bash","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.321\/e\/pkillpgreppidwait-shell-wrappers-gain-ignore-ancestors","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.321","markdown":"### pkill, pgrep and pidwait wrappers skip the shell's own ancestor processes\n\nClaude Code's shell setup now wraps pkill, pgrep and pidwait so they add --ignore-ancestors when supported, keeping them from matching the shell running them\n\n**Unclear.** Which platforms get these wrappers is not stated.\n\n**What**\n\nWhen Claude runs commands through its Bash tool, Claude Code first loads a saved shell setup snippet, called the shell snapshot. That snapshot can define small wrapper functions that sit in front of real commands. Before, only `pkill` (the command that stops processes by name) had such a wrapper, and it had no ancestor check.\n\n- `pkill` now checks whether it supports `--ignore-ancestors`. It runs `command pkill --help`, and if the output mentions that option, it adds the option to the call.\n\n- `pgrep`, which lists processes by name, gets a new wrapper that does the same check.\n\n- `pidwait`, which waits for processes by name, gets a new wrapper that does the same check.\n\n- The `PATH` export is now added in the same ordered list as these wrappers.\n\nThe `--ignore-ancestors` option leaves a process's ancestors out of the results. Ancestors are the processes that started it, such as the shell running the command. The new wrappers are only added when a platform check passes and a flag named `tengu_dreamy_sunbeam` allows it. That flag's built-in fallback is true, but no reading of it has been taken.\n\n**Why**\n\nA command like `pgrep -f` or `pkill -f` matches against full command lines, so it can match the shell that is running it. With these wrappers, such a command is less likely to find or stop Claude's own shell and cut off the session. If your system's versions of these tools do not support `--ignore-ancestors`, they run as before.\n\n- Flag `tengu_dreamy_sunbeam`: Not enough to say (read for one account on one subscription tier against v2.1.321; 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: Bash\n- Tier: You'll notice\n- Useful: 2\/5\n- Signal: 2\/5\n- Scope: individual\n- Heads-up: no"}