Skip to main content
Add hooks to .codex/hooks.json in a trusted project or ~/.codex/hooks.json. Stop notifies when a turn finishes. PermissionRequest notifies when Codex is waiting for approval to use a tool; it does not cover other clarification requests.
--background lets the notification send continue if Codex or its hook is interrupted. Remove the flag if you want the hook to wait for the send to finish. See send-text for details. Codex requires you to review and trust a new or changed hook before it runs. Use /hooks in Codex to review it.