Skip to content
Source
Sign inSign up
pingdotgg/t3code

[Bug]: "Work locally" disappears after worktree setup fails or is cancelled, leaving the thread stuck #46321

OpenGammelSami(GitHub profile, opens in a new tab) opened this issue 0 comments

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

  1. On the environment's machine, use a project whose HTTPS origin has no stored Git credentials (git ls-remote origin fails with could not read Username).
  2. From the Android app, start a new thread in that project with a New worktree workspace.
  3. Wait for setup to fail during "provision worktree".
  4. Check the failure card, then send another message.

Expected behavior

After a failed or cancelled worktree setup, the thread still offers a way to continue without a terminal on the environment's machine, such as the Work locally action shown while setup is running.

Actual behavior

  • No way to switch to local after failure or cancel: While setup is running, the card offers Cancel setup and Work locally. Once setup fails, or is cancelled on desktop (recording "Workspace preparation failed: Worktree setup cancelled."), both actions disappear and only Retry remains. Both web and mobile only render Work locally while phase === "running" (web, mobile).
  • Web also hides it on reopened threads: On web, Work locally is further limited to the draft route (draftId, ChatView.tsx). A reopened server thread whose setup is still running only shows Details and Cancel.
  • Held messages cannot resume: Retry repeats the same failing fetch, and any follow-up messages stay held. Because the thread has no worktreePath and a worktree run failed before starting, the server refuses to resume the queue with "Retry worktree setup or choose a workspace before resuming the queue." (Orchestrator.ts). On desktop, Send now does nothing (second screenshot), and the UI offers no way to choose a workspace for the thread.
  • Dead end from mobile: The thread can only be unblocked by SSHing into the environment's machine, fixing Git credentials, and tapping Retry.

Impact

Major degradation or frequent failure

Version or commit

T3 Code server 0.1.13, Android app build 831

Environment

Android app (Pixel 8 Pro) and Linux desktop app, both connected to a self-hosted environment on a Raspberry Pi (Linux arm64). Project remote: HTTPS Forgejo/Gitea. Provider: Claude.

Logs or stack traces

Workspace preparation failed during provision worktree: Could not create the bestpmv worktree: Git could not authenticate with the remote. Check Git credentials or SSH access on the server, then retry.

Screenshots, recordings, or supporting files

Workaround

  • Fix Git credentials in a terminal on the environment's machine, then tap Retry.
  • Or start a new thread with a local workspace and paste the message again.
  • In theory: tap Retry and, while the new attempt is still running, open Details and tap Work locally (on mobile, it sits in the Details sheet). Untested: the fetch fails within about a second, so it is hard to hit in time. Cancel does not help, it ends in the same stuck state.
  • #30849 / #30897: Retry on Android gives no visible feedback (about the Retry button, not the missing way out).
  • #37196: Held message after an interrupted setup (Stop). This report is about having no way to switch to a local workspace after a failed or cancelled setup.
  • #23044: Git authentication during workspace creation (askpass) (about the root cause, not recovery once setup fails).

AI assistance: Claude Opus 5.5 in T3 Code (Claude Code harness) for source inspection, duplicate search and drafting; Gemini 4 Neon for an editing pass. I hit the bug myself; the root cause on my server was confirmed from the Gitea and reverse proxy logs.

  1. tanstack-source added labelsbug

Sign in to join this conversation.