II.
HookSurface overview
Reference · livehook-surface:claude.worktree-create
WorktreeCreate (Claude Code) overview
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.
Attributes
eventName
WorktreeCreate (Claude Code)
displayName
WorktreeCreate (Claude Code)
kind
native
originVendor
Anthropic
direction
pre
blocking
true
family
shell-hook
payloadSchema
type
object
required
- hook_event_name
- base_path
properties
hook_event_name
type
string
const
WorktreeCreate
base_path
type
string
worktree_path
type
string
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.
Outgoing edges
None.
Incoming edges
exposes1
- agent-runtime-impl:claude-code.runtime@1.x·AgentRuntimeImplClaude Code Runtime (1.x)
maps_hook1
- hook-mapping:claude-worktree-create·HookMapping