Desktop app: a session in a worktree loads skills from the main checkout, not the worktree's .claude/skills

Status Open
Reported on v2.1.286
Maintainer reply None cached
Activity 0 comments · opened Oct 3, 2026

Environment: Claude desktop app 2.19675.0 (Code tab), Claude Code 2.1.286, macOS.

Docs say: the worktrees page (https://code.claude.com/docs/en/worktrees) states that from 2.1.277 a worktree with its own .claude/skills loads only that copy, and falls back to the main checkout only when the worktree has none.

Observed: a session the desktop app opens in a worktree under .claude/worktrees/ lists and loads every skill from the main checkout (the session's originCwd). The Skill tool prints the main checkout's .claude/skills/<name> as "Base directory". CLAUDE.md is read from the worktree in the same session. settings.json hooks also come from the main checkout (hook cwd and CLAUDE_PROJECT_DIR = main checkout; hook input cwd = worktree).

Repro:

  1. git init probe && cd probe, add .claude/skills/hello/SKILL.md whose body says "version A", commit.
  2. git worktree add .claude/worktrees/wt -b wt; in the worktree change the body to "version B", commit.
  3. Open a desktop Code session in the worktree, invoke hello.

Expected: "version B". Actual: "version A", base directory = main checkout.

Impact: a session runs the skill text the main checkout last held, which a push from the worktree never updates. Workaround: a SessionStart hook that fast-forwards the main checkout and returns reloadSkills: true.

🤖 Generated with Claude Code

View original on GitHub ↗