Search the documentation
15 pages for --worktree.
Titles and paths first, then pages whose text carries it. Each row opens that page as this site last read it.
Claude Code changelog
Claude Code CLI · in the page
changelog
…"August 14, 2026"> * Added GitLab merge request URL support to the `--worktree` flag and the `claude agents` view (where MRs display as `!N`) * Added an opt-in `forward_user_identity` apps gateway…
Explore the .claude directory
Claude Code CLI · in the page
claude-directory
…rees', when: <>Read when Claude creates a git worktree via <C>--worktree</C>, the <C>EnterWorktree</C> tool, or subagent <C>isolation: worktree</C></>, description: <>Lists gitignored…
CLI reference
Claude Code CLI · in the page
cli-reference
…| Create a tmux session for the worktree. Requires `--worktree`. Uses iTerm2 native panes when available; pass `--tmux=classic` for traditional tmux…
Common workflows
Claude Code CLI · in the page
common-workflows
…ository needs at least one commit first. ```bash theme={null} claude --worktree feature-auth ``` Run the same command with a different name in a second terminal to start an isolated parallel session…
Run Claude Code behind a corporate launcher
Claude Code CLI · in the page
corporate-launcher
…with the `disableDeepLinkRegistration` setting. * The relaunch that `--worktree` combined with `--tmux` performs: the terminal multiplexer starts that pane, not Claude Code's binary. * The native-mes…
Desktop application
Claude Code CLI · in the page
desktop
…| | Session isolation | [`--worktree`](/docs/en/cli-reference) flag | Automatic worktrees…
Hooks reference
Claude Code CLI · in the page
hooks
…| | `WorktreeCreate` | When a worktree is being created via `--worktree`, `isolation: "worktree"`, or for a background session. Replaces default git behavior…
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. Replaces default git behavior…
Set up Claude Code in a monorepo or large codebase
Claude Code CLI · in the page
large-codebases
…ur starting point. ### Check out only the directories you need The `--worktree` flag starts a session in a new git worktree so changes stay isolated from your main checkout. By default it checks out…
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. Replaces default git behavior…
Claude Code settings
Claude Code CLI · in the page
settings
…| | ### Worktree settings Configure how `--worktree` creates and manages git worktrees. | Key | Description…
Week 19 · May 4–8, 2026
Claude Code CLI · in the page
whats-new/2026-w19
…tting (<code>fresh</code> | <code>head</code>) controls whether <code>--worktree</code>, the <code>EnterWorktree</code> tool, and agent-isolation worktrees branch from the remote default branch or loc…
Week 33 · August 10–14, 2026
Claude Code CLI · in the page
whats-new/2026-w33
…roups. On v2.1.233 or later, pass a GitLab merge request URL to <code>--worktree</code> to branch from it, and the <code>claude agents</code> view labels sessions linked to a merge request as <code>!N…
What's new
Claude Code CLI · in the page
whats-new/index
…erits the full conversation; **GitLab** merge request URLs work with `--worktree` and the `claude agents` view, and marketplaces clone bare `gitlab.com` URLs; and typing **`@`** in the prompt mentions…
Run parallel sessions with worktrees
Claude Code CLI · in the page
worktrees
…sions in separate git worktrees so changes don't collide. Covers the `--worktree` flag, subagent isolation, `.worktreeinclude`, cleanup, and non-git VCS hooks. A [git worktree](https://git-scm.com/do…