Skip to content
BENIBIX Learn

Worktree Tools

AI⌨️ Claude CodeBuilt-in Tools

Also known as EnterWorktree, ExitWorktree, .claude/worktrees

Two tools that move a session into a worktree and back.

Think of it like

It is like going to a spare desk to try something. Then you go back to your own.

Example

Jack is mid-way through a feature when a bug report comes in. Claude enters a new worktree, fixes the bug there, then exits back to the feature.

Why it matters

Two jobs can go on in one project without their changes getting mixed up.

Definition

Two tools move a session into and out of a git worktree. A worktree is a second copy of the project on its own branch. EnterWorktree makes a new worktree and moves the session into it. Or it moves into one that is already there. A new one, or one under .claude/worktrees, does not ask for permission. ExitWorktree leaves the worktree and goes back to the folder the session started in.
One tool moves the session to a second copy. The other brings it back.

Common mistake

Expecting a worktree to share uncommitted changes. Each one is its own copy, so unsaved edits stay where they were made.

Key takeaways

  1. 1
    Enter: new or old. A second copy.
  2. 2
    Exit: go back. To where it started.
  3. 3
    No prompt. Under .claude/worktrees.

Learn it properly