{"version":"2.1.108","anchor":"exitworktree-and-enterworktree-subagent-validation","canonical_anchor":"exitworktree-and-enterworktree-subagent-validation","heading":"ExitWorktree and EnterWorktree Subagent Validation","tier":null,"area":null,"scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.108\/e\/exitworktree-and-enterworktree-subagent-validation","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.108","markdown":"### ExitWorktree and EnterWorktree Subagent Validation\n\nBoth `ExitWorktree` and `EnterWorktree` now validate that they are not being called from a subagent with a cwd override (e.g., `isolation: \"worktree\"` or explicit cwd). This prevents subagents from mutating the parent session's working directory.\n\n**Details**\n\n- Error: \"ExitWorktree cannot be called from a subagent with a cwd override \u2014 it would mutate the parent session's process-wide working directory.\"\n- Directs subagents to use Bash with `cd` for directory changes\n\n**Evidence**\n\nWorktree validation (search for `\"ExitWorktree cannot be called from a subagent\"`)"}