compound-engineering-plugin icon indicating copy to clipboard operation
compound-engineering-plugin copied to clipboard

cross_model_effort rejects codex `max` and `none`, which the Codex CLI accepts

Open giuseppebisemi opened this issue 3 months ago • 2 comments

Summary

On the codex route, cross_model_effort accepts five values: minimal, low, medium, high, xhigh. The Codex API accepts seven. none and max are missing, so a checkout that pins either one fails the cross-model pass closed on a value the provider would have honored.

Where

The same case statement, duplicated:

  • skills/ce-code-review/scripts/cross-model-adversarial-review.sh:317
  • skills/ce-doc-review/scripts/cross-model-doc-review.sh:307
codex:minimal|codex:low|codex:medium|codex:high|codex:xhigh) ;;

The list is restated in the comment above each case statement, in skills/guides/configuration.md:51 ("codex minimal..xhigh"), and in .compound-engineering/config.example.yaml:124-125 with its byte-identical copy skills/ce-setup/references/config-template.yaml. A seventh site pins the belief as a test assertion, which I come back to below.

Evidence

codex-cli 0.150.1, plugin 3.23.4. Feeding the CLI a junk value makes the API return its full enum:

$ codex exec --ignore-user-config --skip-git-repo-check \
    -c model_reasoning_effort=banana -m gpt-5.6-luna --json 'say ok'

{"type":"error","message":"... [ReasoningEffortParam] [reasoning.effort]
 [invalid_enum_value] Invalid value: 'banana'. Supported values are:
 'none', 'minimal', 'low', 'medium', 'high', 'xhigh', and 'max'."}

Both missing values complete normally. max:

{"type":"item.completed","item":{"type":"agent_message","text":"ok"}}
{"type":"turn.completed","usage":{"reasoning_output_tokens":0,...}}

and none, which returns a completed turn with reasoning off:

{"type":"item.completed","item":{"type":"agent_message","text":"ok"}}
{"type":"turn.completed","usage":{"reasoning_output_tokens":0,...}}

So the value travels to the provider and gets validated there. The plugin's list is a hand-maintained copy of that enum, and the enum has grown since it was written.

Why it matters

Failing closed is the right call, and I am not asking you to change it. #1392 decided it ("Fail closed, never substitute. An explicit model or effort the peer cannot honor is a named skip") while closing #1335, and it is the PR that authored this case statement. My problem is upstream of that: the whitelist is what decides the word "cannot," and today it decides wrong. Set cross_model_effort: max and you get

effort override 'max' not compatible with route 'codex'

which reads as a provider limitation.

The exclusion was deliberate rather than accidental, and that is the part worth knowing: tests/skills/ce-code-review-cross-model-routes.test.ts:1931 encodes the belief in the fail-closed table as

["codex", "max"],            // not a codex reasoning level

That comment was true of some earlier CLI and is not true of 0.150.1. So this is not an oversight next to the claude arm, which already carries claude:max at line 316. It is one stale fact, sitting in the validator and asserted again in CI.

Worth separating from any tier policy: this whitelist gates what a checkout may pin, not the script's editorial mapping, which stays at xhigh either way. minimal and low already validate, so widening the range changes no default and settles no question about what tier an adversarial peer should run at.

Proposed fix

Seven surfaces, one belief:

  1. skills/ce-code-review/scripts/cross-model-adversarial-review.sh:317 -- add codex:none and codex:max
  2. skills/ce-doc-review/scripts/cross-model-doc-review.sh:307 -- the same (a test asserts the two functions stay byte-identical)
  3. and 4. the comment above each, which restates the list
  4. skills/guides/configuration.md:51
  5. .compound-engineering/config.example.yaml:124-125 and its byte-identical copy skills/ce-setup/references/config-template.yaml, which AGENTS.md requires be updated together
  6. tests/skills/ce-code-review-cross-model-routes.test.ts:1931 -- the ["codex", "max"] row has to leave the fail-closed table, or the change lands CI-red

Six hand-maintained copies of one provider enum is what let it go stale in the first place, so the fix that holds is a bun test guard pinning the codex list across the validators, their comments, and the docs, the way #1267 paired its knob change with a drift guard. Without it this issue gets refiled the next time OpenAI adds a tier.

One thing worth deciding rather than assuming: none turns reasoning off. If you would rather not offer that on a review peer, that is a fine editorial call, but it is a different reason from the one the code gives now, and the comment should say which it is.

A caveat for the config docs, not an argument against the change: at max the peer's silent stretches get longer, so anyone who has narrowed the peer budget #1267 turned into one knob should widen it before pinning max. (The roughly six-minute quiet gap reported in #1290 was on ce-work's adapter against CE_PEER_IDLE_SECS, a different route and a different budget.)

I am happy to open the PR for all seven surfaces plus the drift guard if you want it.

Out of scope

ce-work's codex adapter (#1289, #1290) and skills/ce-pov/scripts/cross-model-pov.sh both hardcode high with no config key. Separate surfaces, not part of this ask.

giuseppebisemi avatar Aug 28 '26 13:08 giuseppebisemi

Opened https://github.com/EveryInc/compound-engineering-plugin/pull/1567 — the Codex effort whitelist now includes none and max, with a drift guard so the enum cannot go stale in one surface only.

khsaurabh avatar Aug 28 '26 18:08 khsaurabh

Thanks for the detailed writeup, @giuseppebisemi. This got overtaken by #1748, which moved the cross-model peers onto acpx. The effort whitelist now follows what each ACP adapter advertises rather than what codex exec accepts, and the Codex adapter lists low|medium|high|xhigh|max|ultra. So max works today (and ultra too), and the ["codex", "max"] reject row is gone.

none and minimal are still rejected on purpose, because the Codex ACP adapter doesn't advertise them. If that changes, a new issue with the adapter's reported options is welcome. Closing as superseded.

tmchow avatar Nov 11 '26 01:11 tmchow