Skip to content

feat(app): support additional agent approval dialogs - #68

Merged
simota merged 2 commits into
mainfrom
feat/agent-approval-dialogs
Sep 5, 2026
Merged

feat(app): support additional agent approval dialogs#68
simota merged 2 commits into
mainfrom
feat/agent-approval-dialogs

Conversation

@simota

@simota simota commented Sep 5, 2026

Copy link
Copy Markdown
Owner

Auto-approve now recognizes Codex command dialogs and agy workflow questions, confirming the selected first choice with Enter even when the terminal cursor is hidden or parked below the menu. Known prompts that become static during the input cooldown are rescanned after the cooldown expires.

  • Require the complete recognized dialog, its selected first choice, and a valid live tail. Preserve the existing two-scan requirement, pre-send revalidation, input guards, audit feedback, and approval rate limit.
  • Retain the accepted dialog hash through partial model/cost status redraws, preventing duplicate Enter submissions. Clear it when the dialog disappears or changes.
  • Match rejection labels across physical rows, including the split (esc) shortcut in 48-column panes, with and without the optional remember choice. Incomplete or altered labels still hold approval.
  • Document the supported dialogs and opt-in behavior in docs/specs/auto-approve-mode.md.

Validation

  • cargo test --workspace --quiet — passed; noa-app had 1,198 passing tests and 6 ignored tests.
  • cargo test -p noa-app auto_approve::tests:: — 19 passed, including VT/grid regressions for split cost redraws and wrapped rejection labels.
  • cargo build --workspace --locked — passed.
  • cargo fmt --all -- --check and git diff --check — passed.

Both reported regressions failed before their fixes and passed afterward. Coverage also checks changed questions, redisplayed dialogs, incomplete menus, hidden cursors, split UTF-8 input, and cooldown recovery.

Actual CLI acceptance and an interactive macOS recording remain unverified; the terminal tests use synthetic dialog layouts.

Review notes

Auto-approve remains disabled by default. Enabling it opts into execution of commands in the recognized Codex dialog without a command allowlist, and into selecting agy's first recommended workflow answer. The persistent remember choice is never selected. This extends the existing opt-in mode without adding configuration keys or changing persisted formats.

Prevent supported command and question menus from stalling opted-in agent sessions. Confirm the selected one-time approval or recommended answer with Enter, and rescan static prompts after input cooldowns.

Validate with workspace tests, workspace build, formatting checks, and synthetic terminal-grid fixtures. Live CLI acceptance remains unverified.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 5, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-05T07:09:38.766531Z 2ac9c64 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2ac9c6400c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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".

Comment on lines +650 to +653
let remember = remember.join(" ");
remember.is_empty()
|| (remember.starts_with("2. Yes, and don't ask again for commands that start with ")
&& remember.ends_with("(p)"))

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve hard-wrapped remember-option text

When the optional remember choice hard-wraps in the middle of the fixed label—for example, in a 49- or 50-column pane—join(" ") inserts a space inside start, producing s tart; the subsequent starts_with check then rejects an otherwise complete Codex dialog, so auto-approve never fires. Reconstruct these physical-row fragments without assuming that every wrap occurred at whitespace, as the rejection-label fold already does.

Useful? React with 👍 / 👎.

@simota
simota merged commit dca80f9 into main Sep 5, 2026
1 check passed
@simota
simota deleted the feat/agent-approval-dialogs branch September 5, 2026 07:10
@simota simota mentioned this pull request Sep 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant