8 pages for worktreeremove.
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
…e` | No | Yes | Git worktree created | Track isolated workspaces | | `WorktreeRemove` | No | Yes | A worktree created by a `WorktreeCreate` hook is being removed | Clean up workspace resources | | `Cw…
Agent SDK reference - TypeScript
Claude Code CLI · in the page
agent-sdk/typescript
…lt" | "ConfigChange" | "DirectoryAdded" | "WorktreeCreate" | "WorktreeRemove" | "InstructionsLoaded" | "CwdChanged" | "FileChanged" | "MessageDisplay"; ``` ### `HookCallback` Hook ca…
Manage multiple agents with agent view
Claude Code CLI · in the page
agent-view
…es the session and leaves the directory on disk. * When git or your [`WorktreeRemove` hook](/docs/en/hooks#worktreeremove) fails to remove the worktree, Claude Code keeps the worktree and the session,…
Claude Code changelog
Claude Code CLI · in the page
changelog
…graph separator (U+2028, U+2029) * Fixed plugin `WorktreeCreate` and `WorktreeRemove` hooks not running when Claude Code starts with `--worktree` (not yet with `--tmux`) * Fixed OpenTelemetry `tool_re…
CLI reference
Claude Code CLI · in the page
cli-reference
…worktree <worktree-id>` deletes a worktree directory that git or the `WorktreeRemove` hook couldn't remove. `--discard-unpushed` requires Claude Code v2.1.260 or later, and `--force-remove-worktree` r…
Hooks reference
Claude Code CLI · in the page
hooks
…branch from PermissionRequest for auto-mode denials, WorktreeCreate, WorktreeRemove, Notification, ConfigChange, InstructionsLoaded, CwdChanged, FileChanged, and DirectoryAdded as standalone async ev…
Automate actions with hooks
Claude Code CLI · in the page
hooks-guide
…ee"`, or for a background session. Replaces default git behavior | | `WorktreeRemove` | When a worktree that a `WorktreeCreate` hook created is being removed | | `PreCompact` | Before context compacti…
Run parallel sessions with worktrees
Claude Code CLI · in the page
worktrees
…[WorktreeCreate hook](/docs/en/hooks.md#worktreecreate) created, see [WorktreeRemove](/docs/en/hooks.md#worktreeremove) instead. * **The worktree is clean**: for an unnamed session, Claude removes th…