From 16b95e73b0c3498fbdaad412ee82f234693f69bb Mon Sep 17 00:00:00 2001 From: Kelvin Amoaba <97001695+AmoabaKelvin@users.noreply.github.com> Date: Mon, 16 Nov 2026 23:05:29 +0000 Subject: [PATCH] fix(codex): stop warning about absent session day folders and a missing Codex CLI (#43286) The rollout walker warned on every opendir error after its caller's handler had already classified it, so each pending backfill date without a day folder logged ENOENT at startup. The index heal logged a stack trace for every pass on a machine without Codex. Absence is now an empty listing, and a missing CLI aborts the heal quietly for a later retry, like the Codex model catalog probe already does. Co-authored-by: Bensonluo <18586615+Bensonluo@users.noreply.github.com> Co-authored-by: Pr1p <48266347+Pr1p@users.noreply.github.com> --- .../codex/history/index/codex-session-index-heal.ts | 8 +++++++- .../history/rollouts/codex-session-file-listing.ts | 12 ++++++++++-- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/src/main/codex/history/index/codex-session-index-heal.ts b/src/main/codex/history/index/codex-session-index-heal.ts index 2c4e79b9b89..88455005f18 100644 --- a/src/main/codex/history/index/codex-session-index-heal.ts +++ b/src/main/codex/history/index/codex-session-index-heal.ts @@ -1,6 +1,7 @@ import { dirname, join } from 'node:path' import { resolveCodexCommand } from '../../../codex-cli/command' import { isTransientSqliteContention } from '../../../sqlite/sqlite-read-failure' +import { isMissingProviderExecutable } from '../../../provider-process/provider-executable-missing' import { CODEX_SHORT_LIVED_PROBE_APP_SERVER_ARGS } from '../../../codex-cli/codex-read-only-app-server-args' import { buildWslCodexAppServerArgs } from '../../../codex-cli/wsl-codex-command' import { resolveWslExecutablePath } from '../../../wsl/execution/wsl-executable-path' @@ -189,8 +190,9 @@ export async function readCodexThreadsForIndexHeal { + await runSession(invocation, async (rpc) => { let nextIndex = 0 const worker = async (): Promise => { while (nextIndex < batch.length && !shouldStop()) { @@ -211,6 +213,10 @@ export async function readCodexThreadsForIndexHeal { return new Promise((resolve) => { setTimeout(resolve, ms)