[BUG] Skills and hooks not available in worktrees created by `claude -w`
Resolved 💬 4 comments Opened Apr 8, 2026 by Simple-Stark Closed May 23, 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?
Skills and hooks not available in worktrees created by claude -w
What Should Happen?
When creating a worktree with claude -w <name>, Claude Code places it at
.claude/worktrees/<name>. This causes the .claude/ directory discovery
logic to resolve to .claude/worktrees/<name>/.claude/ (which only contains
a copied settings.local.json) instead of the project root's .claude/.
As a result:
- Skills defined in
.claude/skills/are not loaded in the worktree session - Hook scripts referenced by relative paths (e.g.
node .claude/hooks/foo.js)
fail because the path resolves against the worktree directory, not the project root
Error Messages/Logs
Steps to Reproduce
- Have a project at
D:/Code/MyProjectwith skills in.claude/skills/and
hooks in .claude/hooks/
- Run
claude -w feat-123— worktree is created at
.claude/worktrees/feat-123
- Open the worktree session — skills are missing, hooks fail to execute
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.96
Platform
Other
Operating System
Windows
Terminal/Shell
PowerShell
Additional Information
_No response_
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗