{"name":"WorktreeCreate","slug":"worktreecreate","family":"hook","title":"Hook events","noun":"hook event","description":"When a worktree is being created via `--worktree`, `isolation: \"worktree\"`, or for a background session. Replaces default git behavior","description_source":"docs","described_by":{"doc":"claude-code\/hooks","title":"Hooks reference"},"presence":{"first_seen":null,"removed_in":null,"in_current_build":false,"newest_mined":"2.1.308","builds":0,"mined_builds":149,"first_cited":{"version":"2.1.50","released_at":"2026-02-20 23:09:38","spans":12}},"aliases":[],"entries":[{"version":"2.1.300","anchor":"worktree-creation-plugin-worktreecreate-hooks-registered-fi","heading":"Plugin WorktreeCreate hooks now run when you start with --worktree","line":"Claude Code now loads plugins' WorktreeCreate hooks before creating a --worktree, so a plugin can handle worktree creation","released_at":"2026-10-14 14:27:26","reason":"found in this entry's text, named in this entry"},{"version":"2.1.300","anchor":"plugin-worktreecreate-hooks-are-now-registered-before-work","heading":"Plugin WorktreeCreate hooks now run when starting with --worktree","line":"Starting with `--worktree` now sets up plugin worktree hooks first, so a plugin's `WorktreeCreate` hook can run","released_at":"2026-10-14 14:27:26","reason":"found in this entry's text, named in this entry"},{"version":"2.1.295","anchor":"new-claude-code-restrict-personal-config-mode-limits-what-a","heading":"A new setting limits what your own skills, agents and hooks can do","line":"Setting CLAUDE_CODE_RESTRICT_PERSONAL_CONFIG stops your own skills, agents and hooks from widening permissions, and makes key hooks required","released_at":"2026-10-08 18:22:58","reason":"found in this entry's text"},{"version":"2.1.284","anchor":"claude-remote-control-help-notes-updated","heading":"claude remote-control --help now describes the trust prompt and worktree needs","line":"The `claude remote-control` help no longer says to run `claude` first to trust a folder, and notes what worktree mode needs","released_at":"2026-09-28 17:11:59","reason":"found in this entry's text"},{"version":"2.1.281","anchor":"batch-works-outside-a-git-repository-when-a-worktreecreate","heading":"\/batch works outside a git repository when a WorktreeCreate hook is configured","line":"`\/batch` now runs outside a git repository when a `WorktreeCreate` hook is configured, publishing through the project's own version control","released_at":"2026-09-23 17:01:17","reason":"found in this entry's text, named in this entry"},{"version":"2.1.265","anchor":"worktreecreate-hook-failure-no-longer-throws-when-no-hook-is","heading":"WorktreeCreate hook failure no longer throws when no hook is configured","line":"Creating a worktree no longer errors when no WorktreeCreate hook is configured at all","released_at":"2026-09-08 19:05:16","reason":"found in this entry's text, named in this entry"},{"version":"2.1.265","anchor":"hook-engine-reworked-into-explicit-coremanaged-layering-wit","heading":"Hook engine reworked into explicit core\/managed layering with unified result merging","line":"Hook execution engine rebuilt with a clearer core\/managed split and unified result merging","released_at":"2026-09-08 19:05:16","reason":"found in this entry's text, named in this entry"},{"version":"2.1.265","anchor":"worktreecreate-hook-path-now-conditionally-used-via-cwt-in","heading":"WorktreeCreate hook path now conditionally used via Cwt() instead of hX()","line":"The condition for using a WorktreeCreate hook instead of git's default was renamed and restructured","released_at":"2026-09-08 19:05:16","reason":"found in this entry's text"},{"version":"2.1.265","anchor":"new-hook-events-worktreecreate-worktreeremove-now-gate-fe","heading":"New hook events: WorktreeCreate \/ WorktreeRemove now gate feature availability via eE()","line":"Worktree create\/remove UI now also checks a broader capability gate, not just whether hooks are registered","released_at":"2026-09-08 19:05:16","reason":"found in this entry's text, named in this entry"},{"version":"2.1.242","anchor":"managed-hook-skip-message-now-says-sdk-callback-hooks-still-","heading":"Managed hook skip message now says SDK callback hooks still run","line":"The disableAllHooks notice now says SDK callback hooks still run while configured hooks are skipped.","released_at":"2026-08-24 19:16:14","reason":"found in this entry's text"}],"entries_total":14,"docs":[{"source":"claude-code","path":"hooks","title":"Hooks reference","documented":true},{"source":"claude-code","path":"agent-sdk\/hooks","title":"Intercept and control agent behavior with hooks","documented":true},{"source":"claude-code","path":"agent-sdk\/typescript","title":"Agent SDK reference - TypeScript","documented":false},{"source":"claude-code","path":"agent-view","title":"Manage multiple agents with agent view","documented":false},{"source":"claude-code","path":"changelog","title":"Claude Code changelog","documented":false},{"source":"claude-code","path":"claude-directory","title":"Explore the .claude directory","documented":false},{"source":"claude-code","path":"commands","title":"Commands","documented":false},{"source":"claude-code","path":"hooks-guide","title":"Automate actions with hooks","documented":false},{"source":"claude-code","path":"remote-control","title":"Continue local sessions from any device with Remote Control","documented":false},{"source":"claude-code","path":"settings","title":"Claude Code settings","documented":false}],"docs_total":12,"gates":[],"related":[],"url":"https:\/\/changelogs.core-directive.com\/reference\/hook\/worktreecreate","family_url":"https:\/\/changelogs.core-directive.com\/reference\/hook.json"}