fix: update codex-review.sh for current Codex CLI#23
Open
alfdav wants to merge 1 commit intoJuliusBrussee:mainfrom
Open
fix: update codex-review.sh for current Codex CLI#23alfdav wants to merge 1 commit intoJuliusBrussee:mainfrom
alfdav wants to merge 1 commit intoJuliusBrussee:mainfrom
Conversation
The Codex CLI no longer supports `--approval-mode`, `--quiet`, or `-p` flags. The `o4-mini` model is also unavailable on ChatGPT accounts. Additionally, `codex review` outputs a full session transcript (header, tool calls, skill loading) before the actual review — the old script captured only the preamble and missed the findings entirely. Changes: - Replace `codex --approval-mode full-auto --model X --quiet -p` with native `codex review --base <ref>` subcommand - Remove hardcoded `o4-mini` — uses Codex's configured default - Add `_extract_codex_review_body()` to parse session transcripts and extract the final assistant turn (the actual review) - Remove 3000-char truncation that cut off findings - Add broader clean-review detection (LGTM, no issues, looks good) - Add `_append_raw_review()` for native review output storage - Keep legacy P0-P3 table parser as fallback Tested against Codex CLI v0.118.0 with gpt-5.4 on a 1264-line diff. Review produced 4 real findings (2x P1, 2x P2), all correctly extracted and stored. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
07cfad9 to
919f12e
Compare
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
codex-review.shfails on current Codex CLI (v0.118.0+) with two separate breakages:--approval-mode,--quiet,-pno longer exist;o4-miniunavailable on ChatGPT accountsChanges
codex --approval-mode full-auto --model X --quiet -pwith nativecodex review --base <ref>subcommando4-mini— let Codex use its configured default from~/.codex/config.toml_extract_codex_review_body()— parses session transcript to extract the final assistant turn (the actual review), skipping header + tool calls + skill loading${raw:0:3000}truncation that cut off findings before they startedLGTM,no issues,looks good, etc.)_append_raw_review()helper for native review output storageP0-P3table parser as fallbackBefore/After
codex --approval-mode full-auto --model o4-mini --quiet -p "..."codex review --base <ref>o4-minigit diffpiped to stdin--baseflagTesting
Tested end-to-end against Codex CLI v0.118.0 with
gpt-5.4on a 1264-line diff:🤖 Generated with Claude Code