{"version":"2.1.119","anchor":"spawn-mode-for-worktree-isolation","canonical_anchor":"spawn-mode-for-worktree-isolation","heading":"Spawn Mode for Worktree Isolation","tier":null,"area":null,"scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.119\/e\/spawn-mode-for-worktree-isolation","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.119","markdown":"### Spawn Mode for Worktree Isolation\n\n**What**\n\nBackground sessions and remote control servers can now be configured to use git worktree isolation, giving each session its own isolated copy of the repository.\n\n**Details**\n\n- Configured via `--spawn-mode worktree` or in daemon.json `spawnMode: \"worktree\"`\n- System prompt injected for worktree sessions: \"This is a git worktree \u2014 an isolated copy of the repository\"\n- Agents in worktree mode are instructed to call `EnterWorktree` as their first action\n- Session records now carry `worktreePath`, `worktreeBranch`, and `worktreeHookBased` fields\n- After killing a worktree session, the worktree is retained with a hint to use `claude rm` for cleanup\n\n**Evidence**\n\nWorktree spawn mode (search for `\"--spawn-mode\"`, `\"spawnMode\"`, `\"worktree retained at\"`)"}