Skip to content

[BUG] adversarial-review / review fail with HTTP 400 ('gpt-5.5 requires newer Codex') on CLI 0.130.0 #309

Open

Description

@jianjettfu-oss

Symptom

/codex:adversarial-review (and presumably /codex:review) fails immediately with:

[codex] Codex error: {"type":"error","status":400,"error":{"type":"invalid_request_error",
  "message":"The 'gpt-5.5' model requires a newer version of Codex. Please upgrade to the latest app or CLI and try again."}}
[codex] Turn failed.

Result file shows: Codex did not return valid structured JSON. — Parse error: <same 400 above>.

Environment

  • Codex CLI: 0.120.0 → upgraded to 0.130.0 (latest as of 2026-05-09). Same failure on both.
  • Plugin: codex@openai-codex v1.0.4 (latest, reinstalled cleanly to confirm).
  • Auth: ChatGPT login active (verified via node scripts/codex-companion.mjs setup --json → ready: true, auth.loggedIn: true).
  • ~/.codex/config.toml: model = "gpt-5.5" (default after CLI upgrade).
  • Direct codex review --base <ref> works correctly with same model and same config — the issue is plugin-specific.

Reproduction

  1. Codex CLI 0.130.0, ChatGPT login, model = \"gpt-5.5\" in config.toml
  2. Run /codex:adversarial-review --base <ref> --background (or --wait)
  3. Plugin task-thread returns HTTP 400 from Codex API

Root Cause Hypothesis

scripts/codex-companion.mjs adversarial-review (and review) only accept `[--wait|--background|--base|--scope] [focus]` — no `--model` flag (only `task` subcommand accepts `--model`). The companion script falls back to the config.toml default model, which on a freshly-upgraded CLI is `gpt-5.5`. The plugin's task-thread protocol layer apparently doesn't advertise sufficient version to the API for gpt-5.5 dispatch — direct `codex review --base ` (CLI-native, not task-thread) succeeds with the same model and config.

Workaround

Edit `~/.codex/config.toml`: `model = "gpt-5.4"` (older but supported by plugin's task-thread protocol). Revert after invocation.

Suggested Fix

Either:

  • Expose `--model ` flag on `review` and `adversarial-review` subcommands (mirror what `task` already does), so users can pin a known-good model per-invocation, or
  • Update plugin's task-thread protocol layer to advertise the current Codex version to the API, matching what direct `codex review` does.

Plugin 1.0.4 was published 2026-04-18; gpt-5.5 launched 2026-04-23 — plugin is 5 days behind on protocol compatibility.

Impact

Plugin currently unusable on default-config CLI 0.130.0. New users hitting this immediately after install will get the cryptic "upgrade your CLI" message even though CLI is already at latest.

Activity

  1. Steve-ender commented on Sep 8, 2026

    @Steve-ender

    "requires a newer version of Codex" on Windows even after updating: check which codex.exe actually runs

    Additional Windows finding for this error: our Claude Code Codex plugin (1.0.6) failed with The 'gpt-6-astra' model requires a newer version of Codex, although CLI 0.153.4 was installed. The failed jobs were still running an older executable. This may help diagnose similar reports; it does not establish the cause of the original issue here.

    What we found on our Windows machine with the Codex desktop app installed:

    • %LOCALAPPDATA%\OpenAI\Codex\bin\codex.exe reported codex-cli 0.130.0-alpha.5. A hashed subdirectory under that same bin directory contained a different executable reporting codex-cli 0.153.4. This is an observed installation layout, not a claim about how every app update behaves.
    • All eight inspected historical plugin jobs recorded cli_version: 0.130.0-alpha.5 in their saved session metadata, including the Astra failures. Installing newer npm packages had not established that those jobs used them.
    • Plugin 1.0.6 launches codex app-server by name through its inherited Windows shell/PATH and reuses a healthy workspace broker. A newer CLI in another terminal, or a changed PATH, does not upgrade a broker already running. --fresh creates a new thread, not a new broker.
    • Pinning the verified 0.153.4 directory in the plugin child's PATH and using separate CLAUDE_PLUGIN_DATA state produced a successful Astra task. Saved metadata confirmed CLI 0.153.4, originator Claude Code, model gpt-6-astra, and read-only sandbox; output was ASTRA_PLUGIN_OK. A background task that read a local document and returned a result also passed. The plugin used our existing ChatGPT login and normal configuration; no client identity impersonation was involved.

    Both executable selection and broker state were controlled in the successful test. We have not isolated which one accounted for every earlier failure.

    Read-only diagnostics in PowerShell, ideally in the environment that launches the plugin:

    Get-Command codex -All | Select-Object CommandType, Source, Definition
    where.exe codex
    codex --version
    
    $codexBinRoot = Join-Path $env:LOCALAPPDATA 'OpenAI\Codex\bin'
    if (Test-Path -LiteralPath $codexBinRoot) {
        Get-ChildItem -LiteralPath $codexBinRoot -Filter codex.exe -File -Recurse |
            ForEach-Object {
                [pscustomobject]@{
                    Path = $_.FullName
                    Version = (& $_.FullName --version | Out-String).Trim()
                }
            } | Format-List
    }

    Compare these paths/versions with the actual failed job's saved session_meta.cli_version. A version printed by a newly opened terminal does not prove the plugin's existing broker uses it. Do not select a binary solely because its folder looks newer.

    Our workaround uses a child-only PATH pinned to the verified executable and separate plugin data keyed on executable/plugin identity, with inherited broker endpoint variables removed. It leaves existing jobs running. Use that same runtime/data directory for subsequent status/result/cancel commands; changing CLAUDE_PLUGIN_DATA separates job history too. We did not need to restart the CAD application or kill all Codex processes.

    Suggestions for maintainers: expose the serving broker's executable/version in job diagnostics, support an explicit executable path, and detect runtime mismatches when reusing a broker. Offer a fresh compatible broker without terminating in-flight jobs. An explicit path option or an environment variable such as CODEX_EXE would be a proposed feature, not an existing option in the installed plugin we tested.

    This establishes one local cause of the error and a working recovery path. It does not establish the cause of other macOS/Linux reports or rule out separate availability/configuration problems.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions