Skip to content

[Bug]: Claude sessions in T3 worktrees miss the CLAUDE.md files that claude --worktree loads #27656

Open

Description

@viclafouch

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/server

Steps to reproduce

  1. Put instructions in a parent folder of a repo: ~/work/CLAUDE.local.md, with the repo at ~/work/app.
  2. Put a gitignored ~/work/app/CLAUDE.local.md in the main checkout.
  3. In T3, start a Claude thread on app in New worktree mode.
  4. Ask Claude which memory files it loaded.

Expected behavior

The session loads the same memory files as claude --worktree. Claude Code creates its worktrees under <repo>/.claude/worktrees/<name>/ (docs). A session there loads every CLAUDE.md and CLAUDE.local.md of the parent folders: the main checkout and the folders above it.

Actual behavior

T3 creates the worktree under ~/.t3/worktrees/<repo>/<branch>. The parent folders of that path are ~/.t3 and ~, so the session loads neither ~/work/CLAUDE.local.md nor ~/work/app/CLAUDE.local.md. Claude then runs without the team and user instructions that every claude session in that repo gets.

The Worktree location setting from #16231 does not fix it:

  • resolveWorktreesDirectory accepts one absolute path and returns null for a relative path such as .claude/worktrees.
  • T3 creates worktrees at <location>/<repo>/<branch>, so no single value places them inside each project.
  • The row is hidden in project scope.

Impact

Blocks work completely

This blocks my migration from Claude Code to T3. My team's instructions live in CLAUDE.local.md files above the repo, and every T3 worktree session silently drops them. A setup action that copies the files into the worktree covers only files inside the repo: git ls-files never lists a parent folder.

Version or commit

T3 Code (Beta) 0.1.5

Environment

macOS 26.6.2, Claude Code 2.1.314

Workaround

None that works for every project. An @import of each parent file in the user CLAUDE.md works for one known path only.

Related: the ask for worktrees inside the project folder in #6719 (comment).

Activity

  1. viclafouch commented on Oct 30, 2026

    @viclafouch
    Author

    To be clear, this is very painful for me to migrate from CC to T3, because it's a real breaking change of how claude did.

    My memory is lost everytime :(

  2. domvox commented on Oct 30, 2026

    @domvox
    Contributor

    Reproduced twice on T3 Code 0.1.5 with Claude Code 2.1.314 and Claude Haiku 5.5. A synthetic repo contained distinct markers in the parent CLAUDE.local.md, gitignored repo CLAUDE.local.md, and tracked repo CLAUDE.md. Both environments loaded all three in the main checkout. Native Claude loaded all three in its worktree; T3 loaded only the tracked CLAUDE.md. Fresh sessions confirmed the result. No agent tools were used.

  3. domvox commented on Oct 30, 2026

    @domvox
    Contributor

    We investigated this using synthetic repositories on macOS with Claude Code 2.1.314. Placing worktrees inside their own repository restored local and ancestor instructions, rules, and inheritance by native subagents. External imports also worked after approval in native Claude, and T3 respected revocation.

    I found the related discussion #6719 and PR #9681, which was deferred during the V2 rewrite. The environment-wide setting from #16231 does not cover this safely: when pointed inside repo A, worktrees for repo B also landed there and Claude loaded repo A’s private instructions. Without an exclusion, git add -A also staged the nested worktree as a gitlink.

    Would you consider extending the existing setting to support a location resolved relative to each project’s repository root? Defaults and existing worktrees would remain unchanged. The change would also need Git exclusion and appropriate worktree ownership and cleanup checks.

    We have not yet validated effects on non-Git tooling or implemented those lifecycle changes. Is this a direction you would accept, or would you prefer another approach?

  4. viclafouch commented on Oct 30, 2026

    @viclafouch
    Author

    As a CC user, I would like the less breaking change, or something similar for location in order for my memory to be the same as "main checkout".

  5. domvox commented on Nov 2, 2026

    @domvox
    Contributor

    I opened #29148 with an opt-in, repository-relative worktree directory option. This lets worktrees sit under the main checkout so Claude can discover the parent instructions. The PR includes tests and verification details, including the remaining limitations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions