-
Notifications
You must be signed in to change notification settings - Fork 88
feat: add holistic Codex review phase to safe-blitz #8387
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔴 Phase 7b feedback loop re-enters immediately on stale
changes_requestedstatus after re-triggering CodexAfter addressing Codex feedback and re-triggering the review (step 2g), step 2h returns to step 1 of the loop which polls
.claude/check-pr-reviews. However,check-pr-reviewsreports cumulative review status — old reviews are never removed from the PR's review history. Since the old reviews/inline comments still exist,codex_reviewscount remains > 0 and the script returnschanges_requested(see.claude/check-pr-reviews:141-142), notpending.Root Cause: stale review status causes tight re-processing loop
The
check-pr-reviewsscript classifies Codex status by checking in order:+1reaction →rate_limited→ reviews/inline count > 0 →pending. After the agent addresses feedback and re-triggers Codex review (step 2g), the old reviews are still present on the PR (resolving threads in step 2f doesn't remove them from the reviews API). So on the next poll:codex_plus_one:false(no +1 since Codex previously requested changes)codex_rate_limited:falsecodex_review_count > 0:true(old reviews still there)changes_requestedThe agent then proceeds to step 2 and re-reads the same already-addressed review comments (step 2a uses
gh api .../reviews --jq '.[-1].body'which returns the old review), creates duplicate TODO items, runs an unnecessary swarm, resolves already-resolved threads, and re-triggers Codex again — all before Codex has had time to respond to the previous re-trigger.This creates a tight loop that repeats until Codex eventually responds with an approval (+1 reaction). Each iteration wastes significant resources (swarm runs, API calls, TODO churn). In the worst case (slow Codex), many redundant iterations occur.
Fix: After re-triggering Codex in step 2g, the loop should wait for a new review response rather than polling cumulative status. For example, record the timestamp or review count before re-triggering, and in step 1, treat the status as
pendingif no new reviews have appeared since the re-trigger.Prompt for agents
Was this helpful? React with 👍 or 👎 to provide feedback.