Repository navigation
[Bug]: Outdated Codex CLI shows "probe failed: exited with code 1" instead of the compatibility warning #20351
Description
Before submitting
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area
apps/server
Steps to reproduce
- Have an old Codex CLI first on
PATH. Mine iscodex0.1.4161006, the original npm@openai/codex, installed under an old nvm Node prefix. - Start T3 Code (
vp run devon main) with the Codex provider enabled (the default). - Open Settings → Providers, or a new thread.
Expected behavior
The model manifest already marks Codex <0.149.0 as broken and recommends >=0.159.0. T3 Code should detect the installed version and show that advisory ("known to be incompatible… Use >=0.159.0"), ideally with the Update now action.
This used to work. #404 added a minimum Codex version check that fixed #360. codexCliVersion.ts and that check were removed in the effect-codex-app-server rewrite (#1942).
Actual behavior
The Codex provider shows only:
Codex app-server provider probe failed: Codex App Server process exited with code 1.
Nothing says the CLI is outdated. The old CLI treats app-server as a prompt, prints "Missing OpenAI API key." and exits 1.
The cause seems to be in checkCodexProviderStatus (apps/server/src/provider/CodexProvider.ts). The only source of the Codex version is the userAgent in the app-server initialize response. A CLI that can't complete that handshake gets version: null in all three failure branches (spawn error, non-zero exit, timeout). Both features that would explain the problem are then skipped:
applyProviderCompatibility(apps/server/src/provider/providerCompatibility.ts) resolves statusunknownfor a null version, so the manifest'sbrokenrange never applies.enrichProviderSnapshotWithVersionAdvisory(packages/provider-core/src/server/maintenanceResolver.ts) only looks up the latest version whensnapshot.versionis set, so no update is offered.
Impact
Minor bug or occasional failure
Version or commit
main @ e58a485
Environment
macOS 26.6.2, Node 24.22.0, dev server (vp run dev), codex 0.1.4161006 resolved from PATH.
Logs or stack traces
$ codex --version
0.1.4161006
$ codex app-server </dev/null; echo "exit: $?"
Missing OpenAI API key.
Set the environment variable OPENAI_API_KEY and re-run this command.
exit: 1Workaround
Update or remove the old CLI so a current codex is first on PATH, or set Settings → Providers → Codex → Binary path to a current executable. Disabling the Codex provider also hides the error.
Possible fix (happy to send a PR if this direction is OK)
When the app-server probe fails without a spawn error, run codex --version and set its version in the failed snapshot. The fix would be server-only. The client already handles this case: getProviderStatusMessage in apps/web/src/components/chat/ProviderStatusBanner.tsx shows a broken advisory's message ahead of status.message, even when the status is error. With a version set, the existing compatibility and update-advisory code would show "known to be incompatible with this T3 Code release. Use >=0.159.0." and offer the update.
This only affects CLIs that fail the handshake. Versions that answer initialize already get their version and advisory. A broken install whose --version also fails would still show the generic message, which seems fine.
Activity
juliusmarminge commentedon Oct 16, 2026
Note
Grok responding on behalf of Julius.
Confirmed on main. In
checkCodexProviderStatus(apps/server/src/provider/CodexProvider.ts), the only version source is theinitializeuserAgent. The probe-failure and timeout branches both returnversion: null. SoapplyProviderCompatibilityresolvesunknownandenrichProviderSnapshotWithVersionAdvisoryskips the update lookup, and a CLI too old to speakapp-serveronly gets the generic "probe failed … exited with code 1" message.Until there's a fix, the workaround is to put a current
codexfirst onPATH, or set Settings → Providers → Codex → Binary path to a current executable.The direction you proposed is in scope, and a PR is welcome. Keep it server-only: when the probe fails and it isn't a spawn error, run
codex --versionwith a short timeout and put the parsed version on the failed snapshot so the existing compatibility and update advisory code runs. If--versionalso fails, keep today's message. Please include a test for the non-zero-exit branch.