@@ -321,17 +321,15 @@ function resolvePendingUserInputAnswer(
321321 return selectedOptionValues [ 0 ] ?? null ;
322322}
323323
324- /** Codex children settle via task.updated (idle/failed/interrupted), never
325- * task.completed — these rows are mobile's only terminal signal for them. */
324+ /** Some providers settle agents through task.updated instead of task.completed. */
326325const MOBILE_TERMINAL_UPDATE_STATUSES : ReadonlySet < string > = new Set ( [
327- "idle" ,
328326 "completed" ,
329327 "failed" ,
330328 "cancelled" ,
331329 "interrupted" ,
332330] ) ;
333331
334- function isTerminalBypassUpdate ( activity : OrchestrationThreadActivity ) : boolean {
332+ function isTerminalTaskUpdate ( activity : OrchestrationThreadActivity ) : boolean {
335333 if ( activity . kind !== "task.updated" ) {
336334 return false ;
337335 }
@@ -340,9 +338,9 @@ function isTerminalBypassUpdate(activity: OrchestrationThreadActivity): boolean
340338 ? ( activity . payload as Record < string , unknown > )
341339 : null ;
342340 return (
343- payload ?. timelineBypass === true &&
344- typeof payload . status === "string" &&
345- MOBILE_TERMINAL_UPDATE_STATUSES . has ( payload . status )
341+ typeof payload ?. status === "string" &&
342+ ( MOBILE_TERMINAL_UPDATE_STATUSES . has ( payload . status ) ||
343+ ( payload . timelineBypass === true && payload . status === "idle" ) )
346344 ) ;
347345}
348346
@@ -351,8 +349,7 @@ function isTerminalBypassUpdate(activity: OrchestrationThreadActivity): boolean
351349 * activity lives in the Agents sheet, not the work log. Terminal rows are
352350 * kept — with no Agents surface on mobile they are the terminal signal
353351 * (a surface that hides rows must keep its own terminal signal). That means
354- * task.completed (Claude) AND terminal bypassed task.updated (Codex, whose
355- * children never emit task.completed — review finding).
352+ * task.completed and terminal task.updated, including Antigravity cancellation.
356353 */
357354function isAgentInternalActivity ( activity : OrchestrationThreadActivity ) : boolean {
358355 const payload =
@@ -362,7 +359,7 @@ function isAgentInternalActivity(activity: OrchestrationThreadActivity): boolean
362359 if ( ! payload ) {
363360 return false ;
364361 }
365- const isTerminalTaskRow = activity . kind === "task.completed" || isTerminalBypassUpdate ( activity ) ;
362+ const isTerminalTaskRow = activity . kind === "task.completed" || isTerminalTaskUpdate ( activity ) ;
366363 if ( payload . timelineBypass === true && ! isTerminalTaskRow ) {
367364 return true ;
368365 }
@@ -387,8 +384,7 @@ function deriveWorkLogEntries(
387384 if ( activity . tone !== "error" && isWorktreeSetupActivity ( activity . kind ) ) continue ;
388385 if ( activity . kind === "tool.started" ) continue ;
389386 if ( activity . kind === "task.started" ) continue ;
390- // Terminal bypassed updates pass: Codex children's only terminal signal.
391- if ( activity . kind === "task.updated" && ! isTerminalBypassUpdate ( activity ) ) continue ;
387+ if ( activity . kind === "task.updated" && ! isTerminalTaskUpdate ( activity ) ) continue ;
392388 if ( activity . kind === "tool.progress" ) continue ;
393389 if ( activity . kind === "context-window.updated" ) continue ;
394390 if ( activity . summary === "Checkpoint captured" ) continue ;
@@ -432,9 +428,7 @@ function toDerivedWorkLogEntry(activity: OrchestrationThreadActivity): DerivedWo
432428 const changedFiles = extractChangedFiles ( payload ) ;
433429 const title = extractToolTitle ( payload ) ;
434430 const toolPresentation = extractToolActivityPresentation ( payload ) ;
435- // task.updated included: terminal bypassed updates (Codex children's only
436- // terminal signal) must carry task identity so they collapse per child
437- // instead of stacking anonymous "Task idle" rows.
431+ // Terminal task updates carry identity so they replace each child's progress row.
438432 const isTaskActivity =
439433 activity . kind === "task.progress" ||
440434 activity . kind === "task.completed" ||
@@ -498,6 +492,9 @@ function toDerivedWorkLogEntry(activity: OrchestrationThreadActivity): DerivedWo
498492 } ) ;
499493 if ( detail && ! repeatsCommand ) entry . detail = detail ;
500494 }
495+ if ( isTaskActivity && typeof payload ?. error === "string" && payload . error . trim ( ) ) {
496+ entry . detail = payload . error ;
497+ }
501498 if ( viewedImagePath ) {
502499 entry . viewedImagePath = viewedImagePath ;
503500 }
@@ -1099,6 +1096,8 @@ function extractWorkLogToolLifecycleStatus(
10991096 payload : Record < string , unknown > | null ,
11001097) : WorkLogToolLifecycleStatus | undefined {
11011098 const status = payload ?. status ;
1099+ if ( status === "pending" || status === "running" || status === "waiting" ) return "inProgress" ;
1100+ if ( status === "cancelled" || status === "interrupted" ) return "stopped" ;
11021101 if (
11031102 status === "inProgress" ||
11041103 status === "completed" ||
0 commit comments