Skip to content

fix reasoning-effort carriers for codex and agy, which both reject --effort - #212

Merged
atomantic merged 1 commit into
mainfrom
fix/effort-carriers-codex-agy
Aug 27, 2026
Merged

fix reasoning-effort carriers for codex and agy, which both reject --effort#212
atomantic merged 1 commit into
mainfrom
fix/effort-carriers-codex-agy

Conversation

@atomantic

Copy link
Copy Markdown
Owner

Summary

~effort=<level> was passed to every reviewer CLI as --effort <level>. That flag is valid for only claude and grokcodex and agy both reject it and exit non-zero before the review starts, so the reviewer's slot in the merge gate held a launch failure instead of a verdict.

Verified against the installed CLIs:

invocation result
codex --effort max … error: unexpected argument '--effort' found (codex-cli 0.149.1 — no --effort top-level, on review, or on exec)
agy --effort max invalid --effort "max" (valid: low, medium, high)
agy --model "Gemini 3.5 Flash (High)" --effort low --effort is not supported for model …
agy --model "Gemini 3.5 Flash" --effort high --effort is not supported for model …
codex -c model_reasoning_effort=max … review --base main
agy --model gemini-3.5-flash-low ✓ reports low
  • codex carries effort as a config value: -c model_reasoning_effort=<level>.
  • agy treats --effort as mutually exclusive with --model, which this loop always pins. Since the built-in default (Gemini 3.5 Flash (High)) is itself a variant, agy~effort= failed 100% of the time — at every level, not just ones agy lacks. agy encodes effort as a model variant, so it's resolved by picking from the agy models roster at run time. Nothing is hardcoded: the roster and level names change between agy releases.

The deeper fix

Effort was assigned generically and then clobbered per agent, so the fallthrough for any CLI without a branch was --effort — and that fallthrough is exactly what broke both. It's now a case over REVIEW_AGENT that fails closed: an unrecognized agent gets no flag and keeps prompt-advisory effort, because a wrong flag isn't a weaker review, it's a non-zero exit. Pre-flight went 55 → 30 lines and the ordering dependency disappeared.

A new effort-carrier table replaces the same rule restated across six places (Step 8, the 565-word "Pinning" paragraph, two copies in rpr.md, the README, the rationale bullets).

Test plan

  • npm test — 391 pass, 0 fail.
  • New table-driven contract test pins each agent's carrier, asserts no invocation passes a carrier its CLI rejects, and asserts the default is no flag. A new reviewer CLI adds a row rather than a test.
  • Command forms above were run against the real codex and agy binaries, not inferred from --help.

Note

v3.33.1 touched this same area and added the line "names all three effort carriers" — two of those three were still wrong. The carrier table plus the fail-closed default is what stops the next one from being wrong silently.

…effort

The local-agent review loop built one blanket EFFORT_FLAG=(--effort <level>)
for every reviewer CLI. That flag is only valid for claude and grok:

  codex (0.149.1) has no --effort at any level -- not top-level, not on
  `review`, not on `exec` -- and exits 2 with "unexpected argument '--effort'
  found" before the review starts. Its reasoning effort is a config value,
  set via the top-level override -c model_reasoning_effort=<level>.

  agy (1.1.22) treats --effort as mutually exclusive with --model, and this
  loop always pins --model for agy. Every combination is rejected, at every
  level including ones agy itself offers. agy encodes effort as a model
  variant, so it is resolved by picking from the `agy models` roster at run
  time -- the roster and level names change between releases, so nothing is
  hardcoded.

Either way the reviewer never ran, and its slot in the merge gate was filled
by a launch failure rather than a verdict.

The deeper fix is the dispatch shape: effort was assigned generically and then
clobbered per agent, so the fallthrough for any CLI nobody wrote a branch for
was --effort. That fallthrough is what broke both. It is now a case over
REVIEW_AGENT that fails closed -- an unrecognized agent gets no flag and keeps
prompt-advisory effort, because a wrong flag is not a weaker review, it is a
non-zero exit. A new effort-carrier table replaces the same rule restated
across six places.
@atomantic
atomantic merged commit 9d2bc10 into main Aug 27, 2026
4 checks passed
@atomantic
atomantic deleted the fix/effort-carriers-codex-agy branch August 27, 2026 14:40
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