diff --git a/src/infra/session-cost-usage.ts b/src/infra/session-cost-usage.ts index fe6f16fda277..e2f4d41d26a7 100644 --- a/src/infra/session-cost-usage.ts +++ b/src/infra/session-cost-usage.ts @@ -2743,6 +2743,9 @@ export async function loadSessionLogs(params: { let timestamp = 0; if (typeof parsed.timestamp === "string") { timestamp = new Date(parsed.timestamp).getTime(); + if (Number.isNaN(timestamp)) { + timestamp = 0; + } } else if (typeof message.timestamp === "number") { timestamp = message.timestamp; }