The best way to control Claude Code, Codex and more from any computer or phone
fix(clients): say "Starting Claude" until the provider actually starts (#35008)
Julius Marminge committed
Nov 12, 2026 at 02:40 UTC
2b7e975a974f9184b4a212675dd45d3070a789a7
10 files changed
+105
-10
apps/mobile/src/features/threads/ThreadFeed.tsx
+1
@@ -1714,6 +1714,7 @@ function renderFeedEntry(
1714
rowSizing={props.workRowSizing}
1715
iconSubtleColor={iconSubtleColor}
1716
label={entry.label}
1717
+ providerStartingLabel={entry.providerStartingLabel}
1718
/>
1719
);
1720
}
apps/mobile/src/features/threads/thread-work-log.tsx
+3
-1
@@ -1416,8 +1416,10 @@ export function ThreadThinkingRow(props: {
1416
readonly rowSizing: ReturnType<typeof deriveThreadWorkLogSizing>;
1417
readonly iconSubtleColor: ColorValue;
1418
readonly label?: string;
1419
+ /** Replaces "Thinking" while the provider has not started a turn. */
1420
+ readonly providerStartingLabel?: string | undefined;
1421
}) {
1420
- const label = props.label ?? "Thinking";
1422
+ const label = props.providerStartingLabel ?? props.label ?? "Thinking";
1423
return (
1424
<View
1425
accessible
apps/mobile/src/lib/threadActivity.ts
+20
-4
@@ -249,6 +249,8 @@ type ThreadFeedEntryContent =
249
readonly createdAt: string;
250
readonly runId: RunId | null;
251
readonly label?: string;
252
+ /** Shown instead of "Thinking" while the provider has not started a turn. */
253
+ readonly providerStartingLabel?: string;
254
};
255
256
export interface ThreadFeedLatestRun {
@@ -257,6 +259,7 @@ export interface ThreadFeedLatestRun {
259
readonly startedAt: string | null;
260
readonly completedAt: string | null;
261
readonly turnEnded?: boolean;
262
+ readonly providerStartingLabel?: string;
263
}
264
265
/** Long Android headers can ANR despite one-line display; cap labels only, preserving expanded and copied text. */
@@ -1340,7 +1343,8 @@ function latestRunsEqual(left: ThreadFeedLatestRun | null, right: ThreadFeedLate
1343
left.status === right.status &&
1344
left.startedAt === right.startedAt &&
1345
left.completedAt === right.completedAt &&
1343
- left.turnEnded === right.turnEnded)
1346
+ left.turnEnded === right.turnEnded &&
1347
+ left.providerStartingLabel === right.providerStartingLabel)
1348
);
1349
}
1350
@@ -1741,7 +1745,12 @@ export function deriveThreadFeedPresentation(
1745
)
1746
) {
1747
result.push(
1744
- thinkingRow(activeWorkStartedAt, activeRunId, zen ? liveAnswerPreview(feed) : null),
1748
+ thinkingRow(
1749
+ activeWorkStartedAt,
1750
+ activeRunId,
1751
+ zen ? liveAnswerPreview(feed) : null,
1752
+ latestRun?.providerStartingLabel,
1753
+ ),
1754
);
1755
}
1756
const checkpointByRunId = new Map<RunId, ThreadCheckpointSummary>();
@@ -1846,11 +1855,17 @@ function isWorkLogFeedRow(row: ThreadFeedEntry | undefined): boolean {
1855
1856
const LIVE_ACTIVITY_ROW_ID = "live-activity-row";
1857
1849
-function thinkingRow(createdAt: string, runId: RunId | null, label: string | null) {
1858
+function thinkingRow(
1859
+ createdAt: string,
1860
+ runId: RunId | null,
1861
+ label: string | null,
1862
+ providerStartingLabel: string | undefined,
1863
+) {
1864
if (
1865
cachedThinkingRow?.createdAt !== createdAt ||
1866
cachedThinkingRow.runId !== runId ||
1853
- (cachedThinkingRow.label ?? null) !== label
1867
+ (cachedThinkingRow.label ?? null) !== label ||
1868
+ cachedThinkingRow.providerStartingLabel !== providerStartingLabel
1869
) {
1870
cachedThinkingRow = {
1871
type: "thinking",
@@ -1858,6 +1873,7 @@ function thinkingRow(createdAt: string, runId: RunId | null, label: string | nul
1873
createdAt,
1874
runId,
1875
...(label === null ? {} : { label }),
1876
+ ...(providerStartingLabel === undefined ? {} : { providerStartingLabel }),
1877
};
1878
}
1879
return cachedThinkingRow;
apps/web/src/components/ChatView.tsx
+1
@@ -3432,6 +3432,7 @@ export default function ChatView(props: ChatViewProps) {
3432
activePendingApproval?.requestId ?? activePendingUserInput?.requestId ?? null
3433
}
3434
activeTurnStartedAt={activeWorkStartedAt}
3435
+ providerStartingLabel={activeActivityRun?.providerStartingLabel ?? null}
3436
worktreeSetup={worktreeSetup}
3437
onCancelWorktreeSetup={onCancelWorktreeSetupStable}
3438
retryableWorkspacePreparationRunIds={retryableWorkspacePreparationRunIds}
apps/web/src/components/chat/MessagesTimeline.tsx
+4
@@ -232,6 +232,8 @@ interface MessagesTimelineProps {
232
isWorking: boolean;
233
runlessWorkActive?: boolean;
234
activeTurnStartedAt?: string | null;
235
+ /** Replaces "Thinking" while the active run's provider has not started a turn. */
236
+ providerStartingLabel?: string | null;
237
worktreeSetup?: WorktreeSetupSnapshot | null;
238
onCancelWorktreeSetup?: () => void;
239
retryableWorkspacePreparationRunIds?: ReadonlySet<RunId>;
@@ -349,6 +351,7 @@ const ConversationTimeline = memo(function ConversationTimeline({
351
isWorking,
352
runlessWorkActive = false,
353
activeTurnStartedAt = null,
354
+ providerStartingLabel = null,
355
worktreeSetup = null,
356
footer = null,
357
onCancelWorktreeSetup,
@@ -1158,6 +1161,7 @@ const ConversationTimeline = memo(function ConversationTimeline({
1161
backgroundWorktreeSetup,
1162
awaitingUser: awaitingUser !== null,
1163
isPreparingWorktree,
1164
+ providerStartingLabel,
1165
latestRunId: latestRun?.runId ?? null,
1166
liveAnswerPreview:
1167
isWorking && toolCallVisibility === "zen" ? liveAnswerPreview(timelineEntries) : null,
apps/web/src/components/chat/TimelineWorkGroupRows.tsx
+3
-2
@@ -373,13 +373,14 @@ function CompactingLabel({ createdAt }: { createdAt: string | null }) {
373
374
export function ThinkingTimelineRow({ row }: { row: Extract<TimelineRow, { kind: "thinking" }> }) {
375
const ctx = use(TimelineRowCtx);
376
- const { isCompacting, isPreparingWorktree, liveAnswerPreview } = use(TimelineRowActivityCtx);
376
+ const { isCompacting, isPreparingWorktree, liveAnswerPreview, providerStartingLabel } =
377
+ use(TimelineRowActivityCtx);
378
if (isPreparingWorktree || isCompacting) return <WorkLogRow label="" />;
379
// A failed group keeps this disclosure while an approval waits, but nothing is thinking then.
380
const live = ctx.pendingApprovals.size === 0;
381
const activity = (
382
<LiveActivityRow
382
- label={liveAnswerPreview ?? "Thinking"}
383
+ label={providerStartingLabel ?? liveAnswerPreview ?? "Thinking"}
384
iconName="brain"
385
active={live}
386
shimmer={live}
apps/web/src/components/chat/timelineRowContext.ts
+1
@@ -112,6 +112,7 @@ export interface TimelineRowActivityState {
112
isRevertingCheckpoint: boolean;
113
awaitingUser: boolean;
114
isPreparingWorktree: boolean;
115
+ providerStartingLabel: string | null;
116
latestRunId: RunId | null;
117
backgroundWorktreeSetup: WorktreeSetupSnapshot | null;
118
liveAnswerPreview: string | null;
packages/client-runtime/src/state/models.ts
+6
@@ -89,6 +89,12 @@ export interface ThreadRunSummary {
89
* generating while the server settles it.
90
*/
91
readonly turnEnded?: boolean;
92
+ /**
93
+ * Set while the run is open but its provider has not started a turn, so the
94
+ * provider is still launching and nothing is generating. Clients show it
95
+ * instead of "Thinking".
96
+ */
97
+ readonly providerStartingLabel?: string;
98
readonly sourcePlanRef?: {
99
readonly threadId: ThreadId;
100
readonly planId: PlanId;
packages/client-runtime/src/state/threadExecution.test.ts
+43
@@ -301,6 +301,49 @@ describe("thread execution presentation", () => {
301
});
302
});
303
304
+ // The server marks a run running before the provider opens, which can take minutes.
305
+ it("labels an open run whose provider has not started a turn", () => {
306
+ const attemptId = RunAttemptId.make("attempt-starting");
307
+ const openRun = { ...run("run-starting", 1, "running"), activeAttemptId: attemptId };
308
+ const session = {
309
+ id: ProviderSessionId.make("session-starting"),
310
+ driver: ProviderDriverKind.make("claudeAgent"),
311
+ providerInstanceId: openRun.providerInstanceId,
312
+ status: "starting" as const,
313
+ cwd: "/repo",
314
+ model: null,
315
+ // The label reads only the driver.
316
+ capabilities: {} as never,
317
+ createdAt: now,
318
+ updatedAt: now,
319
+ lastError: null,
320
+ };
321
+ const starting = { ...v2Projection, runs: [openRun], providerSessions: [session] };
322
+
323
+ expect(deriveThreadActivityRun(starting)?.providerStartingLabel).toBe("Starting Claude");
324
+ expect(
325
+ deriveThreadActivityRun({ ...starting, providerSessions: [] })?.providerStartingLabel,
326
+ ).toBe("Starting");
327
+ expect(
328
+ deriveThreadActivityRun({
329
+ ...starting,
330
+ providerTurns: [
331
+ {
332
+ id: ProviderTurnId.make("provider-turn-starting"),
333
+ providerThreadId: ProviderThreadId.make("provider-thread-starting"),
334
+ nodeId: NodeId.make("node-starting"),
335
+ runAttemptId: attemptId,
336
+ nativeTurnRef: null,
337
+ ordinal: 1,
338
+ status: "running",
339
+ startedAt: now,
340
+ completedAt: null,
341
+ },
342
+ ],
343
+ })?.providerStartingLabel,
344
+ ).toBeUndefined();
345
+ });
346
+
347
it("presents a held queue as the stopped run instead of queued work", () => {
348
const interrupted = { ...run("run-interrupted", 1, "interrupted"), completedAt: now };
349
const held = { ...run("run-held", 2, "queued"), queueHeld: true };
packages/client-runtime/src/state/threadExecution.ts
+23
-3
@@ -9,6 +9,7 @@ import {
9
isOrchestrationV2WorkActive,
10
isProviderNativeSubagentThread,
11
latestProviderTurnForAttempt,
12
+ PROVIDER_DISPLAY_NAMES,
13
type ModelSelection,
14
type OrchestrationV2NotificationSource,
15
type OrchestrationV2PendingBackgroundTask,
@@ -50,6 +51,8 @@ import { formatSubagentDisplayTitle } from "./subagentDisplay.ts";
51
52
const ACTIVITY_RUN_STATUSES = new Set(["preparing", "starting", "running", "waiting"]);
53
const INTERRUPTIBLE_RUN_STATUSES = new Set(["preparing", "starting", "running"]);
54
+// Preparing runs show their workspace setup instead.
55
+const PROVIDER_STARTING_RUN_STATUSES = new Set(["starting", "running"]);
56
57
const EMPTY_EXTENSION_STATUSES: NonNullable<OrchestrationV2ProviderSession["extensionStatuses"]> =
58
[];
@@ -103,6 +106,17 @@ function latestMatchingRun(
106
);
107
}
108
109
+function providerStartingLabel(
110
+ projection: ThreadStructure,
111
+ run: OrchestrationV2ThreadProjection["runs"][number],
112
+): string {
113
+ const driver = projection.providerSessions.findLast(
114
+ (session) => session.providerInstanceId === run.providerInstanceId,
115
+ )?.driver;
116
+ const name = driver === undefined ? undefined : PROVIDER_DISPLAY_NAMES[driver];
117
+ return name === undefined ? "Starting" : `Starting ${name}`;
118
+}
119
+
120
function summarizeThreadRun(
121
projection: ThreadStructure,
122
run: OrchestrationV2ThreadProjection["runs"][number],
@@ -120,9 +134,15 @@ function summarizeThreadRun(
134
projection.messages.findLast(
135
(message) => message.runId === run.id && message.role === "assistant",
136
)?.id ?? null,
123
- ...(turnStatus === undefined || turnStatus === "pending" || turnStatus === "running"
124
- ? {}
125
- : { turnEnded: true }),
137
+ // A run counts as running before its provider opens; until a turn appears,
138
+ // the provider can still be launching for minutes.
139
+ ...(turnStatus === undefined
140
+ ? PROVIDER_STARTING_RUN_STATUSES.has(run.status)
141
+ ? { providerStartingLabel: providerStartingLabel(projection, run) }
142
+ : {}
143
+ : turnStatus === "pending" || turnStatus === "running"
144
+ ? {}
145
+ : { turnEnded: true }),
146
...(run.sourcePlanRef === undefined ? {} : { sourcePlanRef: run.sourcePlanRef }),
147
};
148
}