EnterWorktree tool creates worktrees inside .claude/ directory, breaking slash command and skill discovery

Open 💬 5 comments Opened Apr 16, 2026 by sachah

Bug Description

The EnterWorktree built-in tool creates new worktrees at .claude/worktrees/<name> instead of a project-standard location. This causes slash commands (/) and skills to fail to load in the resulting sessions, because Claude Code's command/skill discovery gets confused when the working directory is nested inside .claude/ itself.

Steps to Reproduce

  1. Open a project in Claude Code desktop app
  2. Use the EnterWorktree tool (or have the AI use it) to create a new worktree session
  3. In the new session, type / — command autocomplete is empty or broken

Expected Behavior

Worktrees should be created at .worktrees/<name> (respecting the project's existing worktree directory convention) or at minimum outside .claude/. The .claude/ directory is Claude Code's own metadata folder — placing worktrees inside it causes the app to misidentify the project root.

Actual Behavior

Worktrees are created at .claude/worktrees/<name>. Sessions started from these worktrees have non-functional slash command autocomplete and skills don't load correctly.

Workaround

Manually create worktrees using git worktree add .worktrees/<name> -b <branch> instead of using EnterWorktree.

Environment

  • Platform: macOS (desktop app)
  • The issue is reproducible any time EnterWorktree is used

View original on GitHub ↗

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