@devries-cameron20 / t3code Mirror · read-only / commits / dd8c122c5d
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 22, 04:30 UTC

fix(client): keep snoozed failures hidden without completion times (#30063)

Lakshmi Tanmay committed Nov 4, 2026 at 05:14 UTC dd8c122c5d5221eddacb553ae07512bace76a759
2 files changed +15 -3
packages/client-runtime/src/state/threadSettled.ts
+3 -3
@@ -96,14 +96,14 @@ export function threadRaisedHandWhileSnoozed(shell: ThreadSnoozeShell): boolean
96 );
97 }
98
99 -// V2 runtime.updatedAt includes metadata writes; prefer the failed run's completion.
99 +// V2 runtime.updatedAt includes metadata writes, not just failures.
100 // Legacy sessions only expose the runtime timestamp.
101 function failureEdgeAt(shell: ThreadSnoozeShell): string | null | undefined {
102 const runtime = shell.runtime ?? shell.session ?? null;
103 if (runtime?.status !== "error" && runtime?.status !== "failed") return undefined;
104 const latestRun = shell.latestRun ?? shell.latestTurn ?? null;
105 - if (latestRun?.status === "failed" && latestRun.completedAt != null) {
106 - return latestRun.completedAt;
105 + if (latestRun?.status === "failed") {
106 + return latestRun.completedAt ?? null;
107 }
108 return runtime.updatedAt ?? null;
109 }
packages/client-runtime/src/state/threadSnoozed.test.ts
+12
@@ -96,6 +96,18 @@ describe("effectiveSnoozed", () => {
96 pending: undefined,
97 wokeAt: null,
98 },
99 + {
100 + reason: "failure without a completion timestamp",
101 + completedAt: null,
102 + pending: undefined,
103 + wokeAt: null,
104 + },
105 + {
106 + reason: "approval without a failure completion timestamp",
107 + completedAt: null,
108 + pending: "approval",
109 + wokeAt: "2026-04-10T11:00:00.000Z",
110 + },
111 {
112 reason: "fresh failure",
113 completedAt: "2026-04-10T10:00:00.000Z",