Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(codex): allow slow provider probes to finish #9303

ClosedMichel-Liao(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/9303/headopened View on GitHub

Showing 2 changed files with 19 additions and 3 deletions.

x
0 of 2 viewed, 2 left
4 additions and 2 deletionsapps/server/src/provider/Layers/CodexProvider.tsModified
View file
@@ -33,7 +33,6 @@
import { resolveSpawnCommand } from "@t3tools/shared/shell";
import { codexAppServerArgs, resolveCodexLaunchArgs } from "./codexLaunchArgs.ts";
import {
- AUTH_PROBE_TIMEOUT_MS,
buildServerProvider,
COMPACT_SLASH_COMMAND,
type ServerProviderDraft,
@@ -62,6 +61,9 @@
| { readonly failure: string };
​
const CODEX_APP_SERVER_PROBE_FORCE_KILL_AFTER = "2 seconds" as const;
+// Codex's probe includes the app-server handshake, account, models, and skills. On Windows the
+// command shim and concurrent startup probes can legitimately take longer than the shared 10s.
+const CODEX_AUTH_PROBE_TIMEOUT_MS = 20_000;
​
const CODEX_PRESENTATION = {
displayName: "Codex",
@@ -608,7 +610,7 @@
environment: resolvedEnvironment,
}).pipe(
Effect.scoped,
- Effect.timeoutOption(Duration.millis(AUTH_PROBE_TIMEOUT_MS)),
+ Effect.timeoutOption(Duration.millis(CODEX_AUTH_PROBE_TIMEOUT_MS)),
Effect.result,
​