Skip to content

[codex] Revisit shared approval prompting#18040

Closed
abhinav-oai wants to merge 2 commits intomainfrom
dev/abhinav/revive-17594
Closed

[codex] Revisit shared approval prompting#18040
abhinav-oai wants to merge 2 commits intomainfrom
dev/abhinav/revive-17594

Conversation

@abhinav-oai
Copy link
Copy Markdown
Contributor

Why

This revisits the old #17594 branch, which had the right cleanup goal but drew fair feedback that the refactor introduced too many overlapping approval concepts.

The upcoming PermissionRequest hook still wants approval prompting to be more centralized, but the shape here stays narrower: share the routing and caching helpers, and keep the concrete prompt construction local to each caller.

What

  • add a small tools::approval helper module for guardian routing and session approval caching
  • move ApprovalStore out of tools::sandboxing into that helper module
  • switch apply_patch, shell, unified_exec, network approval, and execve prompting to use the shared helper without introducing parallel request-plan abstractions
  • keep the tool-specific request payload construction at each callsite to avoid duplicating approval concepts

Validation

  • cargo test -p codex-core (currently has 2 unrelated pre-existing failures in agent::control and plugins::manager)
  • cargo test -p codex-core tools::network_approval::tests::
  • cargo test -p codex-core tools::runtimes::
  • just fix -p codex-core
  • just fmt

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