fix reasoning-effort carriers for codex and agy, which both reject --effort - #212
Merged
Conversation
…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.
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.
Summary
~effort=<level>was passed to every reviewer CLI as--effort <level>. That flag is valid for onlyclaudeandgrok— codex 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:
codex --effort max …error: unexpected argument '--effort' found(codex-cli 0.149.1 — no--efforttop-level, onreview, or onexec)agy --effort maxinvalid --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 mainagy --model gemini-3.5-flash-lowlow-c model_reasoning_effort=<level>.--effortas 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 theagy modelsroster 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 acaseoverREVIEW_AGENTthat 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.codexandagybinaries, not inferred from--help.Note
v3.33.1touched 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.