Skip to content

Accept the max and ultra reasoning tiers - #637

Open
Yinkai-Dong wants to merge 1 commit into
openai:mainfrom
Yinkai-Dong:accept-max-and-ultra-reasoning-tiers
Open

Accept the max and ultra reasoning tiers#637
Yinkai-Dong wants to merge 1 commit into
openai:mainfrom
Yinkai-Dong:accept-max-and-ultra-reasoning-tiers

Conversation

@Yinkai-Dong

Copy link
Copy Markdown

Problem

Recent Codex CLI builds expose max and ultra above xhigh. They are the two options the TUI offers under more reasoning, and model_reasoning_effort = "max" is already accepted in ~/.codex/config.toml.

VALID_REASONING_EFFORTS in codex-companion.mjs still stops at xhigh, so passing either tier explicitly fails outright:

$ node scripts/codex-companion.mjs task --effort max "..."
Unsupported reasoning effort "max". Use one of: none, minimal, low, medium, high, xhigh.

Leaving --effort unset already falls through to the config default, so this only bites callers who select the tier explicitly — but for them it is a hard failure rather than a degrade, and both the codex:codex-rescue subagent and the codex-cli-runtime skill route --effort through this validator.

Change

  • Add max and ultra to VALID_REASONING_EFFORTS.
  • Keep the four places that document the list in sync: the usage string, the error message, rescue.md's argument-hint, and the codex-cli-runtime skill's accepted-values line.
  • Unknown values are still rejected — this widens the allowlist, it does not remove the guard.

Tests

Adds task accepts the max and ultra reasoning tiers and still rejects unknown ones to tests/runtime.test.mjs. It drives the real script against the fake Codex fixture and asserts that:

  • --effort max and --effort ultra each reach the app-server turn as the selected effort;
  • --effort turbo still exits non-zero with Unsupported reasoning effort "turbo".

tests/commands.test.mjs passes 8/8 with the updated doc assertions.

Note on the rest of the suite

I ran the full suite on Windows. Ten tests in runtime.test.mjs and one in state.test.mjs fail, but they fail identically on a clean checkout of main with this change stashed — they look environment-dependent (temp-dir and process handling) rather than related to this change. Happy to open a separate issue with details if that is useful.

Recent Codex CLI builds expose `max` and `ultra` above `xhigh` -- they are the
two options the TUI offers under "more reasoning", and `model_reasoning_effort
= "max"` is already valid in config.toml. The companion script's allowlist
still stopped at `xhigh`, so `--effort max` and `--effort ultra` were rejected
outright:

    Unsupported reasoning effort "max". Use one of: none, minimal, low,
    medium, high, xhigh.

Leaving `--effort` unset already falls through to the config default, so the
gap only bit callers who passed the tier explicitly -- but for those it was a
hard failure rather than a degrade.

Adds both values to VALID_REASONING_EFFORTS and keeps the usage string, the
error message, the rescue command's argument-hint and the codex-cli-runtime
skill's documented list consistent with it. Unknown values are still rejected.

Covered by a new runtime test that drives the real script: `max` and `ultra`
reach the app-server turn as the selected effort, and an unknown tier still
exits non-zero with the typed error.
@Yinkai-Dong
Yinkai-Dong requested a review from a team August 11, 2026 19:08
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