Skip to content

Codex provider check times out after 20 s when codex app-server starts slowly #27230

Open

Description

@codemanat

What happened

On first launch of T3 Code, and again when adding the agent later, Codex is not detected. The first error was: Unavailable · Codex app-server provider probe failed: failed to reload config: ….codexconfig.toml:6:16: unknown variant priority, expected fast or flex. That came from an outdated npm install of Codex (0.118.0) and is fixed by updating to 0.166.0. After that, the Codex status permanently shows Unavailable · Timed out while checking Codex app-server provider status. Claude is detected correctly. Codex itself works; only the check fails.

Diagnosis

  • The check has a fixed 20 s limit (CODEX_AUTH_PROBE_TIMEOUT_MS in apps/server/src/provider/CodexProvider.ts, tag v0.1.5). The value is unchanged on main (commit dd148481, 2026-10-29).
  • On this machine codex app-server takes about 23–24 s to answer initialize. Process start is slow for codex (both the npm build and the Codex desktop app's build) and for node. Small programs (cmd, git, python, java) start in under 0.5 s.
  • Ruled out: Codex configuration (an empty CODEX_HOME changes nothing), Windows Defender real-time protection (switched off, no change), Defender exclusions for node.exe and codex.exe, and network (CRL fetch 0.7 s).
  • The cause of the slow process starts is not found. The machine is about 10 years old. The user reports that on an earlier attempt T3 Code did not start at all and aborted with an error.
  • Confirmed by experiment: a copy of the installed server.asar with the limit raised to 60 s, started separately with its own --base-dir, reports Codex as ready, authenticated, with models listed. With 20 s the same machine reports Timed out.
  • Suggestion: raise the limit for the Codex check or make it configurable. On timeout, the UI should hint at a slow start instead of only showing "Unavailable".

Steps to reproduce

  1. Use a machine where codex app-server needs more than 20 s to answer initialize (measure with Measure-Command { codex --version }).
  2. Start T3 Code and open Settings → Providers → Codex.
  3. The status shows Timed out while checking Codex app-server provider status.

No deterministic repro on a fast machine was found. A wrapper that delays codex by more than 20 s should have the same effect (not tested).

Version

0.1.5 (desktop app, local server; nightly 0.1.6-nightly.20261029.3892 could not be activated, main stayed active; limit is also 20 s on main)

Environment

Windows 11 Pro 10.0.22631 x64, Node v24.15.0, codex-cli 0.166.0 (npm global, previously 0.118.0), T3 Code desktop 0.1.5, t3 triage CLI 0.1.5. Machine about 10 years old, 64 GB RAM.

Evidence

Unavailable · Timed out while checking Codex app-server provider status.
codex --version: 22.1 s (npm), 17.7 s (desktop app)
node --version:   4.5 s
apps/server/src/provider/CodexProvider.ts:76   const CODEX_AUTH_PROBE_TIMEOUT_MS = 20_000;
apps/server/src/provider/CodexProvider.ts:775  message: "Timed out while checking Codex app-server provider status."
patched copy with 6e4: status=ready, version=0.166.0, auth=authenticated, models=8
earlier error: unknown variant `priority`, expected `fast` or `flex`

Related issues

No issue with the same error found (searched service_tier, unknown variant priority, codex config.toml probe failed). Similar but different: #10576 (Codex Priority display, closed).

Fix applied or workaround

  • npm install -g @openai/codex@latest (0.118.0 → 0.166.0) fixed the first error.
  • Defender exclusions and switching real-time protection off for testing did not help and were reverted.
  • There is no workaround for the timeout in the installed app, only the experiment with the patched copy.

Filed by

claude (sonnet-5-5) via t3 triage, in Claude Code

Activity

  1. VDrozd-Cyclis commented on Oct 31, 2026

    @VDrozd-Cyclis

    Same timeout on Linux, intermittent rather than permanent (T3 Code 0.1.6)

    Seeing the same Timed out while checking Codex app-server provider status. message, but intermittently. The server runs on Linux x64 (Debian, in a container limited to 16 CPUs / 24 GB RAM) with the desktop client (0.1.6) connected from macOS. Codex CLI is 0.166.0, authenticated (ChatGPT Pro). The server is T3 Code 0.1.6, a stable release. CODEX_AUTH_PROBE_TIMEOUT_MS is still 20 s in that tag.

    Server trace, checkCodexProviderStatus span durations:

    • 16:50:08Z: 7.0 s, ready
    • 17:05:08Z: 7.4 s, ready
    • 17:17:11Z: 20.0 s, timed out; the card stayed in error until the next check
    • 17:20:16Z: 1.0 s, ready

    codex --version takes ~55 ms here, so the binary itself starts fast. The variable part is the app-server initialize handshake (it also spawns Codex plugin MCP processes). The container isn't resource-starved: memory use is 5.6 GB of 24 GB and CPU throttling is ~0.03% of periods. The server's event-loop-stall log shows repeated 2–12 s stalls between Oct 27 and Oct 30, though none today, so I can't tie them to this timeout.

    This suggests the 20 s limit has little headroom even on a well-provisioned host. A longer or configurable limit, or retrying a timed-out probe before latching the error, would help here as well.

    Written by Claude (sonnet-5-5) via t3 triage in Claude Code.

  2. codemanat commented on Oct 31, 2026

    @codemanat
    Author

    Related finding with the same pattern but a different code path: the Pi provider aborts pi --version after 4 s (VERSION_PROBE_TIMEOUT_MS = 4e3). On my machine the call takes about 5 s, so Pi is reported as unavailable. Details in #28393. This supports making probe timeouts more generous or configurable across providers, rather than using fixed per-provider constants.

  3. lord007tn commented on Nov 2, 2026

    @lord007tn

    This is a second affected Windows setup with the same timeout, and the failure predates the latest T3 update.

    • T3 desktop: 0.1.7-nightly.20261102.4061 (current/up to date); Codex CLI: 0.166.0.
    • Three separately configured Codex provider instances all show Unavailable · Timed out while checking Codex app-server provider status.
    • Local T3 traces show initialize requests waiting about 20 seconds and timing out before T3 reaches account/read; CLI codex login status reports ChatGPT login under each account home.
    • The prior shadow-home sidecar/symlink error is not present in this check.
    • Updating T3 did not resolve the problem. One system-load sample was high, but I have not established that it caused the slow initialization.

    This supports the existing diagnosis that the fixed probe deadline is too short on some Windows systems. Please consider making the timeout configurable or using a longer startup deadline, and preserving the distinction between a slow app-server start and authentication failure in the provider status.


    Follow-up after tracing the local Codex stderr on November 2: on this setup the T3 timeout was secondary to a stalled Codex state-database backfill. The native app-server reported state db backfill is running and exited after its own 30-second startup wait. The saved checkpoint was not advancing because repeated short-lived launches left the backfill claim in running.

    After taking a consistent SQLite backup, releasing the stalled claim while preserving its checkpoint, and allowing one native Codex app-server process to complete the backfill without T3's watchdog, initialization succeeded after about 188 seconds. Subsequent startup/account checks for all three provider instances took 0.36–0.74 seconds, and T3 now reports all three as authenticated. Existing chat records and curated metadata were checked against the backup and preserved.

    No T3 package patch or restart was needed for this recovery. A longer probe deadline and surfacing the underlying app-server stderr could still improve diagnosis, but the fixed 20-second deadline was not the complete cause on this machine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    via-triageFiled through npx t3 triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions