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
- Have an existing git worktree (e.g., from a previous session or #30906 scenario)
- Ask Claude to move to that existing worktree
- Claude reads the
EnterWorktreedescription, sees "creates a new", and decides it's not applicable - Claude attempts
cdvia Bash instead, which is blocked by the sandbox - 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.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗