Cmd. /hooks
Review lifecycle hooks and manage trust or disabled state.
Key takeaways
/hooksopens the hook browser to inspect lifecycle hooks, trust new or changed ones, and disable individual non-managed hooks before they run.- It covers
PreToolUse,PermissionRequest,PostToolUse,UserPromptSubmit, andStophooks from.codex/hooks.jsonor inline[hooks]config. - Managed hooks are trusted by policy and cannot be disabled here; project-local hooks load only when the
.codex/layer is trusted. - Hooks reached general availability on 2026-05-14;
features.hooksis canonical andcodex_hooksis a deprecated alias. - Treat hooks as guardrails, not a complete enforcement boundary for every shell or tool path.
Original Command Declaration
/hooksOfficial Summary
/hooks opens the hook browser so you can inspect configured lifecycle hooks, trust new or changed
hooks, and disable individual non-managed hooks before they run.
Usage
/hooksGood Examples
- Run
/hooksafter adding.codex/hooks.jsonor inline[hooks]config to verify source and trust state. - Before enabling plugin-bundled hooks, check
/pluginsfor plugin state and/hooksfor actual hook behavior. - Record which hooks are managed by policy and which are local project hooks.
Similar Commands
| Command | Difference | Choose It When |
|---|---|---|
/hooks | Reviews hook sources and trust state | Hooks may run before, during, or after turns |
/plugins | Shows plugin inventory and bundled hooks | You need to know where a hook came from |
/debug-config | Explains config layers | You need precedence and policy diagnostics |
Use Cases
- Reviewing
PreToolUse,PermissionRequest,PostToolUse,UserPromptSubmit, andStophooks. - Auditing prompt-policy checks, secret scans, and validation hooks.
- Checking plugin-bundled hooks before opting into
[features].plugin_hooks = true.
2026-05-14 Update
- The Codex changelog announced Hooks general availability.
- The official slash command table now includes
/hooks. features.hooksis the canonical feature key;codex_hooksremains a deprecated alias.- Plugin-bundled hooks are opt-in in this release.
Cautions
- Managed hooks are trusted by policy and cannot be disabled from the user hook browser.
- Project-local hooks load only when the project
.codex/layer is trusted. - Hooks are guardrails, but they are not a complete enforcement boundary for every shell or tool path.
Release Basis
- Judgment: official command plus GA
- First evidence version:
rust-v0.129.0 - Date (UTC): 2026-05-07; GA announcement 2026-05-14
- Release link: https://developers.openai.com/codex/changelog
Sources
- Codex slash commands: https://developers.openai.com/codex/cli/slash-commands
- Codex hooks: https://developers.openai.com/codex/hooks
- Codex changelog: https://developers.openai.com/codex/changelog