Built-in worktree feature silently disregards project CLAUDE.md instructions, leaving unreconcilable state
Describe the bug
Claude Code's built-in worktree feature creates worktrees under <repo>/.claude/worktrees/<generated-name>, even when the repository's CLAUDE.md explicitly instructs agents not to use it (and to allocate worktrees through a project-provided tool instead). The instruction can't be enforced from the project side: there's no setting to disable or redirect the built-in worktree location, so the only way to notice it happened is to scan for stray .claude/worktrees/* directories after the fact.
This showed up as agent-produced inconsistent state that a human then has to reconcile by hand: across one multi-repo workspace we found 8 worktrees created this way, scattered across 5 repositories, none of them tracked by the project's own worktree bookkeeping. Nothing in the session output flagged that the instruction had been skipped, so it was only caught by a manual audit — the behavior is inconsistent with what the project's own instructions say should happen, and there's no way to tell from the transcript that it diverged.
Expected behavior
Either the built-in worktree feature should honor a project's CLAUDE.md/settings opt-out, or there should be an explicit setting to disable it entirely so project-level worktree policies can actually be enforced instead of only audited after the fact.
Environment
- Multi-repo workspace with several concurrent Claude Code sessions/agents
- Repositories affected: anthropic-api, geo-api (×2), wildlife-photo-africa-web, wildlife-travel-africa-web (×4 instances)