Sidebar shows "Working" during worktree setup, and the timer resets to 0s when the agent starts
What happened
When I start a new thread in a new worktree, the sidebar row shows "Working Ns" and counts up while the worktree is being created. Once the worktree exists and the agent starts, the counter resets to 0s. The sidebar never says a worktree is being prepared (the composer already says "Preparing worktree"), so the reset looks like a glitch.
Requested behavior: show "Preparing Ns" in the sidebar row while the worktree is being created, then switch to "Working Ns" (counting from the agent's start) once the worktree is ready. A distinct label makes the timer restart expected rather than confusing. Simply extending the Working timer across setup would hide the setup phase.
Diagnosis
Mapped against the v0.1.6 source:
resolveSidebarThreadStatus(apps/web/src/components/Sidebar.logic.ts) folds runtime statusespreparing,queued,starting,runningandwaitingintoworking;SidebarThreadRow.tsxlabels all of them "Working".- The duration comes from
resolveThreadWorkingStartedAt→activityStartedAt→orchestrationV2RunWorkStartedAt(run)=workStartedAt ?? startedAt ?? requestedAt(packages/contracts/src/orchestrationV2.ts). - While a run prepares its worktree (
workspacePreparation.type === "worktree"),startedAtis null, so the timer counts fromrequestedAt. When the provider turn starts,startedAtis set and the timer jumps back to 0.workStartedAtis only carried over for wake/delegated/restart continuations.
Possible fix: give the preparing status its own sidebar label ("Preparing") whose timer counts from requestedAt, and keep "Working" counting from startedAt.
Steps to reproduce
- Desktop app on a local server.
- Start a new thread with "New worktree" selected and send a message.
- Watch the thread's sidebar row: "Working" counts up during worktree setup (30–90s here).
- When the worktree is created and the agent starts, the counter resets to 0s.
Version
0.1.6 (desktop app, stable; triage CLI also 0.1.6)
Environment
Windows 10 Pro 19045 x64, desktop app against local server, Codex and Claude providers
Evidence
All 8 new-worktree runs on 2026-11-01 show the gap between `requested_at` and `startedAt` that the timer drops by: 31.5s, 42.2s, 42.7s, 53.7s, 59.4s, 62.1s, 66.1s, 86.3s (`workStartedAt` null in every case). Happens on both codex and claudeAgent runs.
Screenshot of the sidebar row mid-setup attached below.
Related issues
#18374 (mobile preparing pill), #25992
Fix applied or workaround
None; cosmetic.
Filed by
Claude Code (Claude Opus 5.5) via t3 triage