Before submitting
Area
apps/server
Steps to reproduce
- Connect to a remote server (remote environment) whose project repo has both
origin and upstream remotes.
- Set the project new-thread mode to New worktree with Start from origin enabled.
- Start a new conversation, set the base branch to
upstream/main, type a prompt and submit.
Expected behavior
The client shows what is happening while the worktree is prepared (fetching the base ref, creating the worktree), and the server fetches the base branch's actual remote (upstream) before basing the worktree on it.
Actual behavior
After submit, the new conversation is created but there is no meaningful UI feedback about what is going on for roughly a minute; only then does the status flip to Working.
Root cause (all on main):
apps/server/src/ws.ts:1097-1121 hardcodes remoteName: "origin". With base upstream/main it runs git fetch origin (slow and irrelevant on a remote server), then checks remoteBranchExists({ refName: "upstream/main", remoteName: "origin" }) which tests refs/remotes/origin/upstream/main — a ref that can never exist (apps/server/src/vcs/GitVcsDriverCore.ts:1295-1303 concatenates blindly). So it always falls back to the unfetched local upstream/main string. The upstream remote is never fetched, so the worktree may also be based on a stale commit.
- The entire bootstrap (
fetch + worktree add (up to 300s timeout, plus recursive submodule update: GitVcsDriverCore.ts:2826-2863) + setup script + turn start) runs inside a single blocking thread.turn.start+bootstrap WS RPC (ws.ts:1093-1143). No thread.activity.append progress is emitted during fetch/worktree creation (unlike the setup-script steps, which do emit setup-script.requested/started), so the client can only show its local optimistic status with no step detail and no way to cancel.
Related: #8191 (same code area, local-only bases — closed), #8922 (generic client-side setup status).
Impact
Major degradation or frequent failure
Version or commit
main @ a81a52a (also observed on recent nightly)
Environment
Remote server environment; repo with origin + upstream remotes; defaultThreadEnvMode: worktree, newWorktreesStartFromOrigin: true.
Logs or stack traces
No error — the operation eventually succeeds; it is just silent for ~1min. Server trace shows the time going to GitVcsDriver.fetchRemote (origin) and GitVcsDriver.createWorktree inside dispatchBootstrapTurnStart.
Before submitting
Area
apps/server
Steps to reproduce
originandupstreamremotes.upstream/main, type a prompt and submit.Expected behavior
The client shows what is happening while the worktree is prepared (fetching the base ref, creating the worktree), and the server fetches the base branch's actual remote (
upstream) before basing the worktree on it.Actual behavior
After submit, the new conversation is created but there is no meaningful UI feedback about what is going on for roughly a minute; only then does the status flip to
Working.Root cause (all on
main):apps/server/src/ws.ts:1097-1121hardcodesremoteName: "origin". With baseupstream/mainit runsgit fetch origin(slow and irrelevant on a remote server), then checksremoteBranchExists({ refName: "upstream/main", remoteName: "origin" })which testsrefs/remotes/origin/upstream/main— a ref that can never exist (apps/server/src/vcs/GitVcsDriverCore.ts:1295-1303concatenates blindly). So it always falls back to the unfetched localupstream/mainstring. Theupstreamremote is never fetched, so the worktree may also be based on a stale commit.fetch+worktree add(up to 300s timeout, plus recursive submodule update:GitVcsDriverCore.ts:2826-2863) + setup script + turn start) runs inside a single blockingthread.turn.start+bootstrap WS RPC (ws.ts:1093-1143). Nothread.activity.appendprogress is emitted during fetch/worktree creation (unlike the setup-script steps, which do emitsetup-script.requested/started), so the client can only show its local optimistic status with no step detail and no way to cancel.Related: #8191 (same code area, local-only bases — closed), #8922 (generic client-side setup status).
Impact
Major degradation or frequent failure
Version or commit
main @
a81a52a(also observed on recent nightly)Environment
Remote server environment; repo with
origin+upstreamremotes;defaultThreadEnvMode: worktree,newWorktreesStartFromOrigin: true.Logs or stack traces
No error — the operation eventually succeeds; it is just silent for ~1min. Server trace shows the time going to
GitVcsDriver.fetchRemote(origin) andGitVcsDriver.createWorktreeinsidedispatchBootstrapTurnStart.