eventName
WorktreeCreate (Claude Code)
displayName
WorktreeCreate (Claude Code)
kind
native
originVendor
Anthropic
direction
pre
blocking
true
family
shell-hook
payloadSchema
type
object
required
properties
hook_event_name
type
string
const
WorktreeCreate
base_path
worktree_path
description
Fires when a worktree is being created via --worktree or
isolation: "worktree". REPLACES the default git behavior: the hook is
expected to print the new worktree path to stdout (or return
hookSpecificOutput.worktreePath for HTTP hooks). Any non-zero exit
fails the creation entirely.