@devries-cameron20 / t3code-1 / commits / cfafb4bb54
Fork 0

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

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

Co-authored-by: PR Batch Tester <agent@local.test> Co-authored-by: Michel-Liao <107891771+Michel-Liao@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

shivam committed Oct 16, 2026 at 16:43 UTC cfafb4bb54d244e4612f5681aad3832ea64cb0fb
2 files changed +23 -3
apps/server/src/provider/CodexProvider.ts
+6 -2
@@ -36,7 +36,6 @@ import {
36 import { resolveSpawnCommand } from "@t3tools/shared/shell";
37 import { codexAppServerArgs, resolveCodexLaunchArgs } from "./codexLaunchArgs.ts";
38 import {
39 - AUTH_PROBE_TIMEOUT_MS,
39 buildServerProvider,
40 COMPACT_SLASH_COMMAND,
41 providerModelsFromSettings,
@@ -71,6 +70,11 @@ const CODEX_APP_SERVER_PROBE_FORCE_KILL_AFTER = "2 seconds" as const;
70 const CODEX_CATALOG_REFRESH_TIMEOUT = "3 seconds" as const;
71 const CODEX_CATALOG_REFRESH_POLL = "100 millis" as const;
72 const CODEX_CLIENT_NAME = "T3 Code";
73 +// Codex's probe does a full handshake plus account, models, and skills requests, which can
74 +// legitimately run past the shared 10s AUTH_PROBE_TIMEOUT_MS on a loaded or slow machine
75 +// (most often reported on Windows). Give Codex its own longer budget instead of raising the
76 +// timeout for every provider.
77 +const CODEX_AUTH_PROBE_TIMEOUT_MS = 20_000;
78
79 const CODEX_PRESENTATION = {
80 displayName: "Codex",
@@ -660,7 +664,7 @@ export const checkCodexProviderStatus = Effect.fn("checkCodexProviderStatus")(fu
664 ...(managedAuth ? { skipNativeUsage: true } : {}),
665 }).pipe(
666 Effect.scoped,
663 - Effect.timeoutOption(Duration.millis(AUTH_PROBE_TIMEOUT_MS)),
667 + Effect.timeoutOption(Duration.millis(CODEX_AUTH_PROBE_TIMEOUT_MS)),
668 Effect.result,
669 );
670
apps/server/src/provider/ProviderRegistry.test.ts
+17 -1
@@ -588,6 +588,22 @@ it.layer(
588 }),
589 );
590
591 + it.effect(
592 + "does not time out a healthy probe slower than the shared 10s auth-probe timeout (#7513)",
593 + () =>
594 + Effect.gen(function* () {
595 + const statusFiber = yield* checkCodexProviderStatus(defaultCodexSettings, () =>
596 + Effect.sleep("15 seconds").pipe(Effect.as(makeCodexProbeSnapshot())),
597 + ).pipe(Effect.forkChild);
598 +
599 + yield* Effect.yieldNow;
600 + yield* TestClock.adjust("15 seconds");
601 +
602 + const status = yield* Fiber.join(statusFiber);
603 + assert.strictEqual(status.status, "ready");
604 + }),
605 + );
606 +
607 it.effect("closes the app-server probe scope when provider status times out", () =>
608 Effect.gen(function* () {
609 const killCalls = yield* Ref.make(0);
@@ -597,7 +613,7 @@ it.layer(
613 );
614
615 yield* Effect.yieldNow;
600 - yield* TestClock.adjust("11 seconds");
616 + yield* TestClock.adjust("21 seconds");
617 yield* Effect.yieldNow;
618
619 const status = yield* Fiber.join(statusFiber);