fix(clients): a failed turn shows as failed while background work is pending #14184
Mergedjuliusmarmingemerged 1 commit into
t3code/codex-turn-mapping fromrefs/pull/14184/headmerged by juliusmarminge View on GitHubgithub-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:XS
- @@ -164,7 +164,8 @@164164 // The server suppresses the roster while an interruptible activity run exists,165165 // so a remaining roster is stronger than checkpoint-oriented waiting.166166 // latestRun keeps the latest run's status for history presentation.167+// A failed latest run outranks the roster, so the failure stays visible.167168 function shellRuntime(thread: OrchestrationV2ThreadShell): ThreadRuntimeSummary | null {168169 if (thread.latestRunId === null && thread.activeProviderThreadId === null) return null;169- const hasPendingBackgroundTasks = (thread.pendingBackgroundTasks?.length ?? 0) > 0;170- const status = hasPendingBackgroundTasks ? "idle" : (thread.activityRunStatus ?? thread.status);170+ const parkAtIdle = (thread.pendingBackgroundTasks?.length ?? 0) > 0 && thread.status !== "failed";171+ const status = parkAtIdle ? "idle" : (thread.activityRunStatus ?? thread.status);
macroscopeapp[bot](GitHub profile, opens in a new tab) approved these changes
juliusmarminge merged thise364854
juliusmarminge closed this
Sign in to join this conversation.
macroscopeapp[bot](GitHub profile, opens in a new tab) reviewed