Skip to content

Conversation

@zhao-oai
Copy link
Contributor

@zhao-oai zhao-oai commented Dec 3, 2025

Updating the execpolicy TUI flow

In the TUI, when going through the command approval flow, codex will now ask the user if they would like to whitelist the FIRST unmatched command among a chain of commands.

For example, let's say the agent wants to run apple | pear with an empty execpolicy

Neither apple nor pear will match to an execpolicy rule. Thus, when prompting the user, codex tui will ask the user if they would like to whitelist apple.

If the agent wants to run apple | pear again, they would be prompted again because pear is still unknown. when prompted, the user will now be asked if they'd like to whitelist pear.

Here's a demo video of this flow:

new_whitelist_flow.mov

This PR also removed the allow for this session option from the TUI.

@zhao-oai zhao-oai force-pushed the dev/zhao/execpolicy-tui-flow branch from 91c54fc to 878ae52 Compare December 3, 2025 19:10
@zhao-oai zhao-oai force-pushed the dev/zhao/execpolicy-refactor branch 3 times, most recently from 638128c to 00d6382 Compare December 3, 2025 19:21
@zhao-oai zhao-oai force-pushed the dev/zhao/execpolicy-tui-flow branch 2 times, most recently from cde8d54 to 8070a09 Compare December 3, 2025 19:24
@zhao-oai zhao-oai force-pushed the dev/zhao/execpolicy-refactor branch from 00d6382 to 505b845 Compare December 3, 2025 19:25
@zhao-oai zhao-oai force-pushed the dev/zhao/execpolicy-tui-flow branch from 8070a09 to 9612eba Compare December 3, 2025 19:26
@zhao-oai zhao-oai requested a review from bolinfest December 3, 2025 19:33
@zhao-oai zhao-oai force-pushed the dev/zhao/execpolicy-refactor branch 3 times, most recently from d49a447 to 01a8814 Compare December 4, 2025 00:12
@zhao-oai zhao-oai force-pushed the dev/zhao/execpolicy-tui-flow branch from 9612eba to 2c204a1 Compare December 4, 2025 02:03
@zhao-oai zhao-oai force-pushed the dev/zhao/execpolicy-refactor branch 2 times, most recently from 1cc4c2d to 27804c3 Compare December 4, 2025 05:42
@zhao-oai zhao-oai force-pushed the dev/zhao/execpolicy-tui-flow branch 3 times, most recently from f8f7e88 to 5ff39c5 Compare December 4, 2025 06:37
@zhao-oai zhao-oai force-pushed the dev/zhao/execpolicy-refactor branch from c12dd09 to 4488061 Compare December 4, 2025 07:25
@zhao-oai zhao-oai force-pushed the dev/zhao/execpolicy-tui-flow branch from 356be2c to 18e89c4 Compare December 4, 2025 07:26
Base automatically changed from dev/zhao/execpolicy-refactor to main December 4, 2025 07:39
Add explicit prefix-approval decision and wire it through execpolicy/UI snapshots

update doc

mutating in memory policy instead of reloading

using RW locks

clippy

refactor: adding allow_prefix into ApprovedAllowPrefix

fmt

do not send allow_prefix if execpolicy is disabled

moving args around

cleanup exec_policy getters

undo diff

fixing rw lock bug causing tui to hang

updating phrasing

integration test

.

fix compile

fix flaky test

fix compile error

running test with single thread

fixup allow_prefix_if_applicable

fix formatting

fix approvals test

only cloning when needed

docs

add docstring

fix rebase bug

fixing rebase issues

Revert "fixing rebase issues"

This reverts commit 79ce7e1.

fix rebase errors
@zhao-oai zhao-oai force-pushed the dev/zhao/execpolicy-tui-flow branch from 18e89c4 to ef9c195 Compare December 4, 2025 07:40
@zhao-oai zhao-oai enabled auto-merge (squash) December 4, 2025 07:44
@zhao-oai
Copy link
Contributor Author

zhao-oai commented Dec 4, 2025

@codex review

@chatgpt-codex-connector
Copy link
Contributor

Codex Review: Didn't find any major issues. Chef's kiss.

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

@zhao-oai zhao-oai merged commit 8766669 into main Dec 4, 2025
26 checks passed
@zhao-oai zhao-oai deleted the dev/zhao/execpolicy-tui-flow branch December 4, 2025 07:58
@github-actions github-actions bot locked and limited conversation to collaborators Dec 4, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants