fix: raise adversarial review inline diff limits and expose overrides#327
Open
kingdoooo wants to merge 1 commit into
Open
fix: raise adversarial review inline diff limits and expose overrides#327kingdoooo wants to merge 1 commit into
kingdoooo wants to merge 1 commit into
Conversation
Default inline-diff caps (2 files / 256KB) were tuned for early-2024 context windows and caused /codex:adversarial-review to fail on normal-sized PRs. The self-collect path tells Codex to read the diff itself with git commands, but the same turn enforces outputSchema with sandbox: read-only and no shell tool exposed, so Codex emits a tool-call JSON that fails schema validation. Raise defaults to 50 files / 1 MB so the contradictory self-collect path is rarely reached in practice, and add --max-inline-files / --max-inline-bytes overrides on /codex:adversarial-review for users who hit edge cases or want to force the lightweight prompt for debugging.
fireblue
added a commit
to fireblue/codex-plugin-cc
that referenced
this pull request
May 17, 2026
…penai#255, openai#165, openai#253, openai#209, openai#239, openai#307, openai#315) - Raise adversarial review inline diff limits to 50 files / 1MB (openai#327) - Add wall-clock timeouts to JSON-RPC requests (openai#302) - Use codex-namespaced clientInfo.name (openai#200, openai#255) - Handle EAGAIN in hook scripts for non-blocking stdin (openai#165) - Replace Node.js SessionStart hook with faster bash script (openai#253) - Add --fast flag for service_tier support (openai#209) - Set timeout: 600000 on foreground review/adversarial-review flows (openai#239) - Rename gpt-5-4-prompting skill to codex-prompting (openai#307) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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:adversarial-reviewfails on normal-sized PRs (e.g. 10 files / 318KB) withMissing string verdict. Root cause is a contract conflict in the self-collect path:git.mjs:8-9caps inline diff at 2 files / 256KB (defaults from early-2024)git.mjs:331switches to the lightweight self-collect prompt that tells Codex "Inspect the target diff yourself with read-only git commands"codex-companion.mjs:411-412enforcessandbox: "read-only"+outputSchema: review-output.schema.jsonand exposes no shell tool{"cmd": "git status"}), the schema validator rejects it becauseverdictis missing, and the run failsThis PR makes the contradictory self-collect path rarely reachable in practice and gives users an escape hatch when they do hit it:
git.mjs. A 1MB diff is roughly 250K tokens, well within current GPT-5 context, and 50 files covers the long tail of real PRs.--max-inline-files <n>and--max-inline-bytes <n>to/codex:adversarial-review.0forces the self-collect prompt for debugging or unusually large diffs that would blow the context window.The deeper structural fix (multi-turn + shell tool when going self-collect, or relaxing
outputSchemaon that branch) is left out of scope — this PR focuses on the practical regression so the command works on normal-sized PRs again.Out of scope
/codex:review(native reviewer viarunAppServerReview) is unaffected — different code path.Testing
New tests:
collectReviewContext keeps inline diffs for medium-sized adversarial reviews under default limits(11-file diff, default caps → inline-diff)collectReviewContext respects maxInlineFiles override forcing self-collectadversarial review keeps medium-sized diffs inline under default limits(CLI integration)adversarial review --max-inline-bytes forces self-collect on large diffs(CLI integration)adversarial review rejects negative --max-inline-files(input validation)Existing self-collect tests now pass
maxInlineFiles: 2(or--max-inline-files 2) explicitly so they continue to exercise the self-collect path under the higher defaults.