Search the documentation
11 pages for worktreecreate.
Titles and paths first, then pages whose text carries it. Each row opens that page as this site last read it.
Intercept and control agent behavior with hooks
Claude Code CLI · in the page
agent-sdk/hooks
…| | `WorktreeCreate` | No | Yes | Git worktree created…
Agent SDK reference - TypeScript
Claude Code CLI · in the page
agent-sdk/typescript
…| "ElicitationResult" | "ConfigChange" | "DirectoryAdded" | "WorktreeCreate" | "WorktreeRemove" | "InstructionsLoaded" | "CwdChanged" | "FileChanged" | "MessageDisplay"; ``` ### `H…
Manage multiple agents with agent view
Claude Code CLI · in the page
agent-view
…moved out of a hook-created worktree gets the instruction; with no [`WorktreeCreate` hook](/docs/en/hooks#worktreecreate), the copy edits in place. A copy moved out of your worktree is also told neve…
Claude Code changelog
Claude Code CLI · in the page
changelog
…essions started from a non-git directory unable to edit files when a `WorktreeCreate` hook was configured * Fixed the `@` directory picker in `claude agents` not showing registered git worktrees *…
Explore the .claude directory
Claude Code CLI · in the page
claude-directory
…laude/</C></>, <>Git-only: if you configure a <A href="/docs/en/hooks#worktreecreate">WorktreeCreate hook</A> for a different VCS, this file is not read. Copy files inside your hook script instead</>,…
Hooks reference
Claude Code CLI · in the page
hooks
…Denied as a side branch from PermissionRequest for auto-mode denials, WorktreeCreate, WorktreeRemove, Notification, ConfigChange, InstructionsLoaded, CwdChanged, FileChanged, and DirectoryAdded as sta…
Automate actions with hooks
Claude Code CLI · in the page
hooks-guide
…| | `WorktreeCreate` | When a worktree is being created via `--worktree`, `isolation: "worktree"`, or for a background session. Re…
Plugins reference
Claude Code CLI · in the page
plugins-reference
…| | `WorktreeCreate` | When a worktree is being created via `--worktree`, `isolation: "worktree"`, or for a background session. Re…
Claude Code settings
Claude Code CLI · in the page
settings
…eckout until `EnterWorktree` is called. Outside a git repository, a [`WorktreeCreate` hook](/docs/en/worktrees#non-git-version-control) that fails releases the block so the session can edit the workin…
Run parallel sessions with worktrees
Claude Code CLI · in the page
worktrees
…ds its git metadata. A worktree without git metadata, such as one a [`WorktreeCreate` hook](#non-git-version-control) created, can pass the check; the cases Claude Code still refuses are listed with t…
Changelog
Claude Documentation · in the page
cowork/changelog
…sions failing with a "path contains control characters" error when a `WorktreeCreate` hook prints status output before the path. **Cowork** * Fixed an occasional "Something went wrong" error whe…