Skip to content
Source
Sign inSign up
pingdotgg/t3code

[Bug]: Codex provider still flips unavailable with the 20s timeout — follow-up to #20234 #20431

ClosedOuna-the-Dataweaver(GitHub profile, opens in a new tab) opened this issue 2 comments

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/desktop

Steps to reproduce

  1. Use T3 Code desktop nightly 0.1.1-nightly.20261016.3218 with codex-cli 0.163.0 and ChatGPT authentication.
  2. Keep the Codex provider enabled with the default five-minute health-check interval.
  3. Use the app on a connection with variable latency to OpenAI. My affected Windows machine has a VPN active.
  4. Leave the app running through several health-check cycles.
  5. Observe Codex intermittently switching from Ready to unavailable.

This is intermittent rather than deterministic. The installed server bundle was inspected and confirmed to contain CODEX_AUTH_PROBE_TIMEOUT_MS = 20_000, so this is occurring after the timeout increase.

Expected behavior

A transient delay in optional model-catalog discovery should not mark an authenticated Codex provider unavailable.

Optional model and skills discovery should have bounded fallbacks. After a successful readiness check, a transient timeout should ideally preserve the last good state with a stale/warning indication.

Actual behavior

Follow-up to #20234, which was closed after the timeout increase in #15945. I cannot reopen the original issue, so I am reporting fresh measurements from the updated nightly.

Codex still intermittently becomes unavailable. In 22 retained checkCodexProviderStatus trace spans, seven hit the new deadline, lasting 20.115–20.157 seconds. This is a retained trace sample, not a complete count of all checks.

In all seven timeout cases, account/read had already completed and the probe had reached model-catalog discovery:

  • Startup/initialize: 0.172–0.775 seconds.
  • Account/read: approximately 12.330–12.773 seconds, inferred from the surrounding trace spans.
  • First model/list: 5.004–5.018 seconds.
  • T3 then waited for models_cache.json to receive a fresh timestamp.

The installed implementation allows that cache-freshness wait up to three seconds, but the shared 20-second deadline interrupted it before its cached-catalog fallback could finish. T3 then returned an error snapshot with unknown authentication.

Four fresh diagnostic probes subsequently completed within 12.244–13.092 seconds, with authenticated account responses. However, all four logged "failed to refresh available models: request timed out". Startup and skills discovery were fast.

There was also one separate Codex failure: "workspace routing discovery timed out" after approximately 15.2 seconds. Raising only T3's outer timeout would not address that failure.

The VPN may contribute, but these measurements do not establish VPN causality or worsening connectivity. Unauthenticated connectivity spot checks had TLS establishment times around 0.75–0.81 seconds; authenticated Codex operations were still slow.

Could optional catalog discovery be given an independent deadline/fallback so it cannot invalidate a successful account check? Preserving the last good readiness state on transient failures, as discussed in #7230, would also help.

Impact

Blocks work completely

Version or commit

0.1.1-nightly.20261016.3218

Environment

Windows 11 Pro 10.0.26300, x64; T3 Code Nightly desktop; codex-cli 0.163.0 installed via npm; ChatGPT authentication; VPN active (v2RayTun); Tailscale adapter also active.

Logs or stack traces

Diagnostic summary from retained server.trace.ndjson files:
22 checkCodexProviderStatus spans; seven reached the 20-second deadline.

Representative check started 2026-10-17 00:03:45.511 UTC
(03:03:45.511 Moscow time):

  withCodexAppServerClient:       171.732 ms
  inferred account/read:      ~12,536 ms
  first requestAllCodexModels:  5,014.960 ms
  subsequent cache wait:      interrupted by overall deadline
  probeCodexAppServerProvider: 20,013.323 ms, exit=Interrupted
  checkCodexProviderStatus:    20,130.043 ms

The outer check span reports Success because it returns a provider
error snapshot; this does not mean the provider health check passed.

Separate failure at 2026-10-16 22:55:42.487 UTC:
  probeCodexAppServerProvider: 15,187.977 ms
  CodexAppServerRequestError: workspace routing discovery timed out

Warning recorded in other completed probes:
  Codex did not refresh its model catalog in time; using the cached catalog.

All four fresh app-server probes logged:
  failed to refresh available models: request timed out

Screenshots, recordings, or supporting files

No response

Workaround

Waiting for a later health check can restore Ready, but the status continues to fluctuate. No reliable workaround verified on this build.

So far the only way to make this work for me is to restart t3 code or wait next scan. Worst part, sometimes I can ask OC/CC to double check with sol/astra, but by the time opus reaches the call codex dies and it can no longer do the call :(

Sorry for the issue, but internet in russia is that bad now, there are some UPD problems on my ISP which make VPN extremely slow to connect.

  1. Ouna-the-Dataweaver(GitHub profile, opens in a new tab) added labelsneeds-triage

  2. Note

    Grok responding on behalf of Julius.

    This is a real bug on current main, separate from the timeout length that #15945 raised. Thanks for the per-step timings; they made it easy to confirm.

    In apps/server/src/provider/CodexProvider.ts, probeCodexAppServerProvider runs account/read, then for ChatGPT accounts requestCodexChatGptModels: a first model/list, a wait of up to 3s for models_cache.json to be refreshed, then a second model/list. All of it runs under the single 20s CODEX_AUTH_PROBE_TIMEOUT_MS in checkCodexProviderStatus. Only the cache wait has its own limit, and neither model/list call does. When the outer deadline fires, the result becomes an error snapshot with auth: unknown, so an account/read that already succeeded is thrown away. With ~12.5s for account/read plus ~5s for the first model/list, your traces match this path exactly.

    The workspace routing discovery timed out error comes from Codex app-server itself, not from T3's deadline. Code alone doesn't tell us whether it's a Codex/network issue, so it isn't covered here. If it keeps happening, please open a separate report.

    Related: #7230 (a timed-out probe gets cached as an error). It's a different issue from this one.

  3. juliusmarminge added labelsvia-triage

  4. juliusmarminge removed labelsneeds-triage

  5. Yo they gotta make an agent that can take these tiny prs and auto fix ts shi

  6. juliusmarminge closed this

Sign in to join this conversation.