claude --worktree: .claude/ subdirectories (skills, agents, docs, rules) not copied to worktree
Open 💬 5 comments Opened Feb 24, 2026 by channel-dante
Bug Description
When using claude --worktree, the generated worktree's .claude/ directory only contains settings.local.json. All other subdirectories (skills/, agents/, docs/, rules/) and settings.json are missing, causing skills and custom agents to be unavailable in the worktree session.
Steps to Reproduce
- Set up a project with
.claude/directory containing skills, agents, docs, and rules - Run
claude --worktree - Check the worktree's
.claude/directory
Expected Behavior
The worktree's .claude/ directory should contain (or symlink to) all subdirectories from the main repo's .claude/:
skills/agents/docs/rules/settings.jsonsettings.local.json
Actual Behavior
Only settings.local.json is present in the worktree's .claude/ directory:
Main repo .claude/:
.claude/
├── agents/
│ ├── code-worker.md
│ └── grafana-log-search.md
├── docs/
│ ├── coding-guidelines.md
│ └── go-patterns.md
├── rules/
│ ├── db-schema.md
│ └── sync-rag-voicealf.md
├── settings.json
├── settings.local.json
├── skills/
│ ├── cleanup-stale-/
│ ├── commit-push-pr/
│ ├── llm-test/
│ └── worktree/
└── worktrees/
Worktree .claude/:
.claude/
└── settings.local.json
Environment
- Claude Code version: 2.1.51
- OS: macOS (Darwin 25.2.0)
- Shell: zsh
Suggested Fix
Either copy or symlink the skills/, agents/, docs/, rules/, and settings.json from the source project's .claude/ directory when creating the worktree's .claude/ directory.
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗