Accept the max and ultra reasoning tiers - #637
Open
Yinkai-Dong wants to merge 1 commit into
Open
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Recent Codex CLI builds expose
maxandultraabovexhigh. They are the two options the TUI offers under more reasoning, andmodel_reasoning_effort = "max"is already accepted in~/.codex/config.toml.VALID_REASONING_EFFORTSincodex-companion.mjsstill stops atxhigh, so passing either tier explicitly fails outright:Leaving
--effortunset 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 thecodex:codex-rescuesubagent and thecodex-cli-runtimeskill route--effortthrough this validator.Change
maxandultratoVALID_REASONING_EFFORTS.rescue.md'sargument-hint, and thecodex-cli-runtimeskill's accepted-values line.Tests
Adds
task accepts the max and ultra reasoning tiers and still rejects unknown onestotests/runtime.test.mjs. It drives the real script against the fake Codex fixture and asserts that:--effort maxand--effort ultraeach reach the app-server turn as the selected effort;--effort turbostill exits non-zero withUnsupported reasoning effort "turbo".tests/commands.test.mjspasses 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.mjsand one instate.test.mjsfail, but they fail identically on a clean checkout ofmainwith 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.