[BUG] Skills always load from repo root instead of worktree's working directory

Resolved 💬 3 comments Opened Feb 23, 2026 by jaredscheib Closed Apr 1, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

When running Claude Code inside a git worktree, skills are always loaded from the main working tree's .claude/skills/ rather than the worktree's own .claude/skills/. Skill changes on the worktree's branch are never reflected in the session — the main tree's version always wins regardless of which branch the worktree is on.

Git worktrees are designed so each worktree reflects its own checked-out branch. Loading skills from the repo root instead of the worktree's working directory violates that contract.

This hampers the ability to iterate on skills from a worktree and validate iterated skills in fresh Claude Code instances created from that branch.

What Should Happen?

Skills load from the worktree's .claude/skills/.

Error Messages/Logs

None

Steps to Reproduce

  1. Have a repo with .claude/skills/<name>/ on the main branch
  2. Create a worktree with claude -w on a branch with modified .claude/skills/<name>/
  3. Open Claude Code in the worktree directory
  4. Trigger the skill — the main tree's version runs, not the worktree's

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.50 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

iTerm2

Additional Information

See #27069 — that issue reports skills loading twice when worktrees are stored outside the main repo. We filed separately because that bug could be fixed via deduplication without addressing the loading priority issue described here.

View original on GitHub ↗

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