{"version":"2.1.330","anchor":"bridge-worktrees-can-be-prepared-early-with-a-mods-aware-pat","canonical_anchor":"remote-control-worktree-cleanup-consults-a-mod-driven-check","heading":"Remote Control worktrees now involve mods when they are created and cleaned up","tier":"notice","area":"Remote Control","scope":"individual","heads_up":true,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.330\/e\/bridge-worktrees-can-be-prepared-early-with-a-mods-aware-pat","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.330","markdown":"### Remote Control worktrees now involve mods when they are created and cleaned up\n\nRemote Control sessions can prepare worktrees early and use mod-driven checks and notes when deciding to keep or remove them\n\n**Unclear.** It is not clear what mods are or what turns this on, so whether a user will see it is unknown.\n\n**What**\n\nA worktree is a separate working copy of your project, so a session can make changes without touching your main folder. Remote Control sessions, which let you drive Claude Code from another device, now let mods take part in creating and cleaning up worktrees:\n\n- `loadMods` and `fallsBackToSameDir` are new options passed to the bridge, the part that connects Remote Control to your local Claude Code.\n\n- When `loadMods` resolves true, the bridge starts creating the worktree before its fallback check, instead of after it.\n\n- The bridge records what it asked for: the tree, `loadMods` and whether there was an agents mod.\n\n- When a session ends, whether the worktree is kept or removed can now come from that recorded check. Before, it depended only on uncommitted changes and commit counts.\n\n- Copies made by a mod are removed without checking for uncommitted changes.\n\n- A mod's release note now appears in the keep or remove screen, starting with \"A mod noted:\".\n\n- The message for the `w` toggle mentions \"git\" only when git is present.\n\n- Worktree mode now needs a git repository or `WorktreeCreate` hooks. Hooks are your own commands that Claude Code runs at set moments.\n\n**Why**\n\nThis changes whether Remote Control leaves worktrees behind when a session ends. If you use mods or `WorktreeCreate` hooks with Remote Control, they can now affect when worktrees are created and whether they are cleaned up.\n\n- Area: Remote Control\n- Tier: You'll notice\n- Useful: 2\/5\n- Signal: 3\/5\n- Scope: individual\n- Heads-up: yes"}