claude desktop: worktree sessions should inherit the base repo's .claude config
Open 💬 0 comments Opened Jul 9, 2026 by Kizuno18
pairs with #76113 (fork into worktree) — once you're working in worktrees a lot, the worktree session loses the base repo's context
what
when a session runs inside a git worktree of a repo, it should inherit that repo's main .claude/ — CLAUDE.md, commands, settings/permissions — by default, instead of starting from a bare/minimal .claude in the worktree checkout
my real setup
i run worktree sessions across several submodules (.claude/worktrees/* exist in the root, dash, kizubot, store) — the worktrees each get their own minimal .claude and drop everything the base repo's .claude had
the pain
- worktree session doesn't see the base repo's CLAUDE.md (db schema conventions, api signatures, container-provisioning rules) — so it re-derives them or gets them wrong
- doesn't see the base repo's commands (deploy-bot, run-api-server) even though it's a worktree OF that repo
- re-approves the same permissions the base repo already had approved
- so every worktree/fork starts half-blind about a codebase it's literally a checkout of
ask
- worktree session inherits the base repo's
.claude/(CLAUDE.md + commands + settings/permissions) by default - worktree-local
.claudestill overrides/extends on top (nearest wins) - ideally the same for "fork into worktree" (#76113) — the fork keeps the parent repo's config, not just the conversation history
related: #76113, #76111