Before submitting
Area
apps/server
Steps to reproduce
- Create a bare repository with linked worktrees, for example:
git clone --bare <url> repo/.git
git -C repo worktree add dev
- Run Claude Code or Codex sessions inside
repo/dev.
- Start T3 Code with a fresh home and open the welcome screen.
- Look at the project candidates offered for import.
Expected behavior
repo/dev is listed as a candidate, and importing it brings in the sessions that ran there.
Actual behavior
Only repo (the bare root) appears. The worktree is never offered, so its sessions cannot be imported from onboarding.
AgentSessionScanner.readGitIdentity treats every .git file whose gitdir: points into a worktrees/ directory as a linked worktree and drops it, on the assumption that its history belongs to the main checkout. A bare repository has no main checkout, so none of its worktrees are ever offered. Adding the worktree as a project by hand does not help either, because the session import only runs from the welcome screen.
Impact
Major degradation or frequent failure
Version or commit
main at bfec238
Environment
Linux, web client served by npx t3 / dev server. Claude Code and Codex sessions.
Logs or stack traces
Scan result with a bare repo at ~/git/repo and six linked worktrees under it: only /home/user/git/repo is returned; none of the worktrees appear.
Workaround
None from the UI. Sessions can only be imported if they ran at the bare root.
Before submitting
Area
apps/server
Steps to reproduce
repo/dev.Expected behavior
repo/devis listed as a candidate, and importing it brings in the sessions that ran there.Actual behavior
Only
repo(the bare root) appears. The worktree is never offered, so its sessions cannot be imported from onboarding.AgentSessionScanner.readGitIdentitytreats every.gitfile whosegitdir:points into aworktrees/directory as a linked worktree and drops it, on the assumption that its history belongs to the main checkout. A bare repository has no main checkout, so none of its worktrees are ever offered. Adding the worktree as a project by hand does not help either, because the session import only runs from the welcome screen.Impact
Major degradation or frequent failure
Version or commit
main at bfec238
Environment
Linux, web client served by
npx t3/ dev server. Claude Code and Codex sessions.Logs or stack traces
Scan result with a bare repo at
~/git/repoand six linked worktrees under it: only/home/user/git/repois returned; none of the worktrees appear.Workaround
None from the UI. Sessions can only be imported if they ran at the bare root.