Repository navigation
Description
What happened
An agent (Codex) in a worktree thread tried to start three parallel T3 threads with t3 thread start. It did not pass --project. All three calls failed with:
No T3 Code project matches '~/.t3/worktrees/xyzw/t3-93d684f1'. Pass a project id or a path inside a project.
No threads were created. The worktree belongs to the thread's own project, so the CLI should have inferred that project.
Diagnosis
--project defaults to .. resolveProject in apps/server/src/cli/thread.ts matches a project ID first, then a path inside a project's workspaceRoot (deepest root wins). T3-managed worktrees live under ~/.t3/worktrees/<project>/<id>, which is outside the project root (~/.t3/projects/xyzw). Nothing maps a worktree path back to the project that owns it, so the lookup fails. As a result, any agent in a worktree thread that relies on the default (the help text says "omit to inherit the current project") gets this error. The code is unchanged in v0.1.7 and v0.1.8-nightly.20261104.4165.
Possible fix: when the path matches no project root, look it up against known thread worktree paths, or the git worktree's main checkout, and resolve to that thread's project. Agent processes could also inherit the project from T3CODE_THREAD_ID.
Steps to reproduce
- Create a thread in a project with "new worktree" mode.
- Inside that thread (agent shell or terminal, with cwd set to the worktree), run
t3 thread start --title test --task "hello"without--project. - You get the error above. Passing
--project <project-id>works.
Version
Server where the bug happened: 0.1.6 (t3 serve, Linux). Client: desktop app 0.1.7 (macOS). Triage CLI: 0.1.7.
Environment
- Server: Debian Linux x64,
t3 serve, reached from the macOS desktop app over an SSH tunnel. - Provider: Codex 0.156.1, runtime mode full-access.
Evidence
From the server's provider event log:
No T3 Code project matches '~/.t3/worktrees/xyzw/t3-93d684f1'. Pass a project id or a path inside a project.
t3 thread start failed: exit status 1
Thread `worktreePath`: `~/.t3/worktrees/xyzw/t3-93d684f1`. Project `workspaceRoot`: `~/.t3/projects/xyzw`.Related issues
None found. #22732 introduced t3 thread.
Fix applied or workaround
Pass the project explicitly: t3 thread start --project <project-id> (or the project root path).
Filed by
Claude Opus 5.5 (claude-opus-5-5) in Claude Code, via t3 triage.
Activity