Skip to content

add --dangerously-bypass-hook-trust CLI flag#21768

Merged
abhinav-oai merged 6 commits into
mainfrom
abhinav/trust-hooks-flag
May 13, 2026
Merged

add --dangerously-bypass-hook-trust CLI flag#21768
abhinav-oai merged 6 commits into
mainfrom
abhinav/trust-hooks-flag

Conversation

@abhinav-oai
Copy link
Copy Markdown
Collaborator

@abhinav-oai abhinav-oai commented May 8, 2026

Why

Hook trust happens through the TUI in /hooks so it can block non-interactive use cases. This flag will allow users that are using codex headlessly to bypass hooks when they want to.

What

This adds one invocation-scoped escape hatch.

  • the CLI flag sets a runtime-only bypass_hook_trust override; there is no durable config.toml setting
  • hook discovery still respects normal enablement, so explicitly disabled hooks remain disabled
  • we show a --dangerously-bypass-hook-trust is enabled. Enabled hooks may run without review for this invocation. message on startup so accidental use is visible in both interactive and exec flows

This keeps “enabled” and “trusted” as separate concepts in the normal path, while giving CI/E2E callers a stable way to opt into the exceptional path when they already control the hook set.

@abhinav-oai abhinav-oai changed the title [codex] add trust-hooks CLI flag [codex] add hook trust bypass CLI flag May 8, 2026
@abhinav-oai abhinav-oai changed the title [codex] add hook trust bypass CLI flag [codex] add --dangerously-bypass-hook-trust CLI flag May 8, 2026
@abhinav-oai abhinav-oai marked this pull request as ready for review May 8, 2026 16:14
@abhinav-oai abhinav-oai requested a review from a team as a code owner May 8, 2026 16:14
@abhinav-oai abhinav-oai changed the title [codex] add --dangerously-bypass-hook-trust CLI flag add --dangerously-bypass-hook-trust CLI flag May 8, 2026
@abhinav-oai abhinav-oai enabled auto-merge (squash) May 12, 2026 16:34
@abhinav-oai abhinav-oai merged commit 392e94e into main May 13, 2026
27 checks passed
@abhinav-oai abhinav-oai deleted the abhinav/trust-hooks-flag branch May 13, 2026 07:13
@github-actions github-actions Bot locked and limited conversation to collaborators May 13, 2026
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