Skip to content

Refuse an older Codex by its version, and show which Codex doctor found - #84

Merged
softmarshmallow merged 1 commit into
mainfrom
codex-version-check
Oct 13, 2026
Merged

softmarshmallow merged 1 commit into
mainfrom
codex-version-check

Conversation

@softmarshmallow

Copy link
Copy Markdown
Member

Part (a) of #73. An older codex earlier on PATH broke every Codex call. It rejected codex mcp list --json, so the run was refused with a sentence about MCP servers, and doctor still called the route servable.

What changes

Where Before After
A run Codex's MCP servers could not be listed, so they cannot be turned off Codex 0.150.0 (from PATH) is older than 0.160.1: update it, or set GRIDA_FX_TOOL_CODEX to a newer one, refused for the whole run before anything else starts
A Codex that prints no version the same MCP sentence Codex (from PATH) did not name its version: update it to 0.160.1 or later, or set GRIDA_FX_TOOL_CODEX to a newer one
doctor route … imagegen@codex servable a new program codex <path> (PATH, 0.150.0) line, and route … imagegen@codex too old (codex 0.150.0; FX needs 0.160.1+)
doctor <target> exit 0 exit 1, as a live run would refuse
  • The runtime runs codex --version first (30 s). It reads the first X.Y.Z word of the output (codex-cli 0.160.1) and compares it with 0.160.1, the version this behaviour was verified on.
  • A refusal names where Codex was found (GRIDA_FX_TOOL_CODEX, PATH or the ChatGPT app), never its path, because refusals are recorded. doctor is terminal output, so it prints the path, as its tool lines already do.
  • doctor prints a program line for each program the user installs. Grok Build's line has no version: Grok Build reports it only once started, where it is already checked.
  • Shared code: finding a program now also returns where it was found. installed::Version holds the version comparison, which Grok Build's existing check now uses too.
  • Spec first: spec/providers.md §9.6 (the version, where Codex was found, the refusals) and §9.8 (where Grok Build was found). The guide (running, Codex), llms.txt, the onboarding reference and AGENT_READINESS follow.

Not included

Checks

  • cargo fmt --check, cargo clippy --all-targets -- -D warnings
  • cargo test --workspace --no-fail-fast: everything passes except two tests that also fail without this change:
    • the Grok dropped-call test fails 2 runs in 3 on main;
    • the host-pool startup test passes on its own.
  • New tests:
    • how codex --version output is read;
    • an older Codex is refused for the run and nothing else is started;
    • a Codex that names no version is refused;
    • doctor's program lines and its too old / no version states, including exit 1 for doctor <target>.
  • tools/check_spec.py, tools/check_llms.py
  • doctor run by hand with a fake old codex placed first on PATH: too old (codex 0.150.0; FX needs 0.160.1+). No live call was made.

@vercel

vercel Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
fx Ready Ready Preview Oct 13, 2026 4:21pm UTC

Request Review

@chatgpt-codex-connector

Copy link
Copy Markdown

To use Codex here, create an environment for this repo.

An older codex earlier on PATH broke every Codex call: it rejected
`codex mcp list --json`, so the run was refused with a sentence about MCP
servers, while doctor still called the route servable.

- Before anything else, the runtime asks `codex --version`. A Codex older
  than 0.160.1, the version this behaviour was verified on, or one that
  names no version, is refused for the invocation with a reason that names
  the version and where it was found (GRIDA_FX_TOOL_CODEX, PATH or the
  ChatGPT app), never its path.
- doctor prints a `program` line per installed program: its path, where it
  was found, and Codex's version. Codex's routes say `too old (codex <v>;
  FX needs 0.160.1+)` or `no version (codex)`, so `doctor <target>` exits 1
  as a live run would refuse.
- Finding a program now returns where it was found, and the version
  comparison is shared with Grok Build's check (`installed::Version`).
- spec/providers.md §9.6 first; the guide, llms.txt, the onboarding
  reference and AGENT_READINESS follow.

Part (a) of #73. Preferring a newer copy over an older one on PATH, (b),
is a separate spec decision and is not included.
@softmarshmallow
softmarshmallow merged commit 8b08e54 into main Oct 13, 2026
13 checks passed

This branch was successfully deployed

1 active deployment
Preview — b6ad2094 Deployed Oct 13, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant