"No project" threads silently disappear when the T3 home directory is inside a git repository#32339
What happened
I can't create threads without a project. The option doesn't appear anywhere in the desktop app, and agents can't create no-project threads either. It works on my other Mac with the same app.
Diagnosis
ManagedProjectFolders turns off the scratch root when config.baseDir is inside a git work tree (apps/server/src/project/ManagedProjectFolders.ts:233-245, the same on main). In that case the server leaves scratchWorkspaceRoot out of the server config (apps/server/src/ws.ts:1745-1805), and the web client hides every "No project" entry point (DraftHeroHeadline.tsx, CommandPalette.tsx, useScratchProject.ts) whenever that field is null.
On this machine, ~ had a .git directory, so ~/.t3 counted as inside a repository. That repo had no commits and no tracked files. Its only refs were 18 refs/t3/orchestration-v2/checkpoints/... refs left by an earlier T3 project whose workspace root was ~. So the repo was probably created by an accidental git init, or as a side effect of using the home directory as a project.
The check itself makes sense, because scratch folders inside a checkout would inherit its git status. The problem is that it fails silently. Nothing in the UI, the settings, or the logs tells the user why the feature is missing, and the result is cached with Duration.infinity, so fixing the repo still needs a full app restart.
Possible improvements:
- Show a notice or diagnostic when scratch is turned off, and name the repository root.
- Or use a scratch location outside the enclosing work tree.
- Re-probe without needing a restart.
Steps to reproduce
- On macOS, run
git init ~so the home directory is a repository and~/.t3is inside it. - Fully quit T3 Code desktop and launch it again.
- Open the new-thread screen or the command palette. There is no "No project" option, and agents can't start a no-project thread.
- Run
mv ~/.git ~/.git-backupand fully restart the app. The option comes back.
Version
0.1.6 (T3 Code (Beta) desktop app, local server reports serverVersion 0.1.6)
Environment
macOS (Darwin 27.2.0) arm64, Node v24.22.1, desktop app with its local server
Evidence
| 1 | $ cd ~/.t3 && git rev-parse --show-toplevel |
| 2 | /Users/<user> |
| 3 | |
| 4 | $ git -C ~ log |
| 5 | fatal: your current branch 'main' does not have any commits yet |
| 6 | |
| 7 | $ git -C ~ ls-files | wc -l |
| 8 | 0 |
| 9 | |
| 10 | $ git -C ~ for-each-ref refs/t3 | wc -l |
| 11 | 18 |
| 12 | |
| 13 | # GET /.well-known/t3/environment -> serverVersion 0.1.6, capabilities.threadProjectFromScratch: true |
| 14 | # but the UI shows no "No project" option, because scratchWorkspaceRoot is not set |
| 15 | |
| 16 | # After `mv ~/.git ~/.git-respaldo-home`: |
| 17 | $ cd ~/.t3 && git rev-parse --show-toplevel |
| 18 | fatal: not a git repository (or any of the parent directories): .git |
Related issues
#27626 (Initialize Git on a No-project thread runs git init at the scratch root) is related: it is one way the T3 home could end up inside a repository. #23727 and #26051 are other scratch-root edge cases (symlinks). None of them cover the scratch feature silently turning off.
Fix applied or workaround
Renamed the home-directory repository (mv ~/.git ~/.git-respaldo-home, which can be undone) and fully restarted the desktop app.
Filed by
Claude Code (claude-opus-5-5) via t3 triage