fix(app-server): fix approval events in review mode#10416
Merged
Conversation
celia-oai
approved these changes
Feb 2, 2026
Collaborator
|
@codex review |
Contributor
|
Codex Review: Didn't find any major issues. Delightful! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
jif-oai
approved these changes
Feb 3, 2026
7abde29 to
86ceb64
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
One of our partners flagged that they were seeing the wrong order of events when running
review/startwith command exec approvals:Key fix: In the review sub‑agent delegate we were forwarding exec (and patch) approvals using the parent turn id (
parent_ctx.sub_id) as the approval call_id. That madeitem/commandExecution/requestApproval.itemIddiffer from the actualitem/startedid. We now forward the sub‑agent’scall_idfrom the approval event instead, so the approval item id matches the commandExecution item id in review flows.Here’s the expected event order for an inline
review/startthat triggers an exec approval after this fix:turn(status inProgress) andreview_thread_id(same as parent thread for inline).turn/startednotificationitem/started→ EnteredReviewModeitem/started→ commandExecutionitem/commandExecution/requestApprovalrequestitem/commandExecution/outputDeltanotifications.item/completed→ commandExecution with status and exitCode.item/started→ ExitedReviewModeitem/completed→ ExitedReviewModeturn/completednotificationThe key being #4 and #5 are now in the proper order with the correct item id.