Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(codex): a slow but healthy Codex no longer shows as Unavailable #15945

Mergedshivamhwp(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/15945/headmerged by shivamhwp(GitHub profile, opens in a new tab) View on GitHub

Showing 2 changed files with 23 additions and 3 deletions.

x
0 of 2 viewed, 2 left
6 additions and 2 deletionsapps/server/src/provider/CodexProvider.tsModified
View file
@@ -36,7 +36,6 @@
import { resolveSpawnCommand } from "@t3tools/shared/shell";
import { codexAppServerArgs, resolveCodexLaunchArgs } from "./codexLaunchArgs.ts";
import {
- AUTH_PROBE_TIMEOUT_MS,
buildServerProvider,
COMPACT_SLASH_COMMAND,
providerModelsFromSettings,
@@ -71,6 +70,11 @@
const CODEX_CATALOG_REFRESH_TIMEOUT = "3 seconds" as const;
const CODEX_CATALOG_REFRESH_POLL = "100 millis" as const;
const CODEX_CLIENT_NAME = "T3 Code";
+// Codex's probe does a full handshake plus account, models, and skills requests, which can
+// legitimately run past the shared 10s AUTH_PROBE_TIMEOUT_MS on a loaded or slow machine
+// (most often reported on Windows). Give Codex its own longer budget instead of raising the
+// timeout for every provider.
+const CODEX_AUTH_PROBE_TIMEOUT_MS = 20_000;
​
const CODEX_PRESENTATION = {
displayName: "Codex",
@@ -660,7 +664,7 @@
...(managedAuth ? { skipNativeUsage: true } : {}),
}).pipe(
Effect.scoped,
- Effect.timeoutOption(Duration.millis(AUTH_PROBE_TIMEOUT_MS)),
+ Effect.timeoutOption(Duration.millis(CODEX_AUTH_PROBE_TIMEOUT_MS)),
Effect.result,