fix(app): let codex approval prompts settle before auto-approving - #90
Merged
Merged
Conversation
Codex 0.156.1 drops an Enter that lands right after its approval modal's first paint. Noa fired on the second consecutive match, which can come milliseconds later, and then treated the ignored prompt as consumed, so it sat unanswered. Hold codex prompts until they have been on screen for 300ms; the stability rescan fires once they settle.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Merged
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.
Codex could leave a command-approval prompt unanswered even though auto-approve had fired:
NOA_AUTO_APPROVE_TRACE=1loggedsent CodexCommand to "codex", but the command did not run. Codex 0.156.1 ignores an Enter that arrives immediately after its approval modal first appears. Noa fires on the second consecutive match, which can arrive milliseconds after the first paint when codex draws follow-up frames. Noa then treated the ignored prompt as consumed and never retried it.Add a per-signature settle delay. Codex prompts now wait until they have been on screen for 300ms, and the existing 350ms stability rescan fires once they settle. Claude Code and agy signatures still fire on the second match.
Validation:
y, about 3 minutes later.codex_prompt_waits_for_settle_before_firing, covers the settle window. Existing codex tests now advance time past the settle delay.cargo test -p noa-app: 1240 passed, 0 failed.cargo clippy -p noa-app --all-targets: no new warnings. The only warnings are pre-existing ones intext_panel.rsandnoa-pty.rustfmt --checkon the changed file.The user's original report has not been confirmed to be this failure mode. On recurrence, the diagnostics from
NOA_AUTO_APPROVE_TRACE=1would distinguish "sent but ignored" from "never detected". The 300ms threshold was measured against codex 0.156.1 and may need revisiting if codex changes.