[Bug]: Mobile keeps New worktree default for non-git projects and cannot start a task
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 86/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- git, typescript
- Domain
- mobile
Research direction
Start in apps/mobile/src/features/threads/new-task-flow-provider.tsx, then compare its default resolution with resolveSendEnvMode in apps/web/src/components/ChatView.logic.ts. Check the existing vcsEnvironment.status data for non-git projects and verify that NewTaskDraftScreen.tsx can start a task and queue it offline with Current checkout selected automatically.
Written by the indexing model from the issue text.
Description
Before submitting
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area
apps/mobile
Steps to reproduce
- Set the default thread env mode to New worktree (global setting, project setting, or
t3.json). - Add a project folder that is not a git repository.
- On mobile, open New task for that project and type a prompt.
Expected behavior
The draft falls back to Current checkout, the same as desktop. A worktree cannot exist without a git repository, so worktree mode should never be the resolved default for a non-git project.
Actual behavior
The workspace control stays on New worktree, the branch control shows Choose branch with nothing to choose, and Start stays disabled.
Desktop already handles this case: resolveSendEnvMode in apps/web/src/components/ChatView.logic.ts returns local when isGitRepo is false (#1914, #1936). Mobile resolves the default in apps/mobile/src/features/threads/new-task-flow-provider.tsx through resolveDefaultThreadEnvMode without checking isRepo, although it already queries vcsEnvironment.status for the project. NewTaskDraftScreen.tsx then blocks the send on workspaceMode === "worktree" && !selectedBranchName, and a task queued offline in that state stays parked in the outbox.
The comment in packages/shared/src/threadEnvMode.ts says both platforms must agree on the resolved mode. The non-git fallback only exists on web today.
Impact
Minor bug or occasional failure
Version or commit
Server: T3 Code (Nightly) 0.0.34-nightly.20260821.1147. Mobile: Android client, current build as of 2026-08-22. Source checked on main at 2c4158f87a.
Environment
macOS server, Android client
Logs or stack traces
No response
Screenshots, recordings, or supporting files
No response
Workaround
Tap the workspace toggle to Current checkout before sending, or set that project's default thread env mode to local.
- Dominant language
- TypeScript
- Stars
- 23.3k
- Forks
- 6k
- Avg merge
- 10h 57m
- Merged PRs (30d)
- 365
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from pingdotgg/t3code
-
bug via-triage
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
accepted bug via-triage
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
-
accepted bug via-triage
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
accepted bug via-triage
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
All issues in pingdotgg/t3code
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
copse-dev/agent-pane#2953 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·