Skip to content

[codex] Support continue/stopReason universal fields for PermissionRequest hook#17864

Draft
abhinav-oai wants to merge 18 commits intomainfrom
dev/abhinav/permission-request-hook-universal-fields
Draft

[codex] Support continue/stopReason universal fields for PermissionRequest hook#17864
abhinav-oai wants to merge 18 commits intomainfrom
dev/abhinav/permission-request-hook-universal-fields

Conversation

@abhinav-oai
Copy link
Copy Markdown
Collaborator

Why

Pull the universal continue/stopReason logic into its own stacked PR so the broader PermissionRequest hook changes can be reviewed separately.

What

  • add universal continue and stopReason field support for PermissionRequest hook handling
  • thread those fields through the relevant core hook and approval paths
  • keep the follow-up diff focused on this universal-field behavior

Validation

  • No additional checks run during the branch split and PR restack

abhinav-oai and others added 18 commits April 12, 2026 12:27
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
Replace stringly approval-attempt plumbing with a shared enum, centralize approval decision handling in the orchestrator, and document plus test the reserved PermissionRequest output fields.

Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
Keep PermissionRequest hook payloads focused on tool identity and the actionable command details. For Bash and exec_command hooks, plumb request justification into tool_input.description when present. For NetworkAccess hooks, pass the originating command and a network-access <domain> description instead of the old approval context envelope.

Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
Remove the approval-attempt enum and let callers provide the final permission-request hook run id suffix directly. This keeps retry hook runs unique without carrying an extra cross-crate type.\n\nCo-authored-by: Codex <noreply@openai.com>
# Conflicts:
#	codex-rs/core/src/codex.rs
Base automatically changed from codex/permission-request-hooks-base to main April 17, 2026 14:45
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