EnterWorktree description causes AI to refuse re-entering existing worktrees

Resolved 💬 2 comments Opened Mar 5, 2026 by 7tsuno Closed Apr 2, 2026

Description

The EnterWorktree tool description says it "creates a new" worktree, but it can also be used to enter an existing worktree. This misleading description causes the AI to incorrectly conclude that the tool cannot be used for existing worktrees, leading to a dead end.

This is especially problematic in combination with #30906, where a resumed session loses its worktree cwd and the AI then cannot navigate back.

Steps to reproduce

  1. Have an existing git worktree (e.g., from a previous session or #30906 scenario)
  2. Ask Claude to move to that existing worktree
  3. Claude reads the EnterWorktree description, sees "creates a new", and decides it's not applicable
  4. Claude attempts cd via Bash instead, which is blocked by the sandbox
  5. There is no way to navigate to the existing worktree

Expected behavior

The EnterWorktree tool description should indicate that it can also enter/resume existing worktrees, so the AI uses it correctly.

Actual behavior

The AI avoids EnterWorktree for existing worktrees and gets stuck with no viable alternative.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗