How to Uninstall Hooks in Codex on Mac

Step-by-step guide to inspecting, separating personal vs. workplace-managed rules, and uninstalling hooks in OpenAI Codex on macOS.

AI Agent bar · Updated

On macOS, OpenAI Codex can load background hooks from your home folder, project workspaces, or system-wide management directories—without surfacing those rules inside the chat window.

How OpenAI Codex Hooks Work

OpenAI Codex triggers external scripts automatically on lifecycle events including UserPromptSubmit, PreToolUse, PostToolUse, Stop. Developers use personal hooks for formatting or completion notifications, while enterprise endpoint software often deploys Admin Installed hooks that can observe prompts, shell commands, or file paths.

Method 1: Uninstall Codex Hooks in One Click with AI Agent bar

  1. Download AI Agent bar for Mac (macOS 14+ on Apple Silicon, 14 actual-use days free with no credit card required).
  2. Click the AI Agent bar icon in your Mac’s menu bar and open the Codex tab.
  3. Identify whether each hook is Admin Installed or Self Configured, along with the local app responsible and its Data Scope.
  4. Select any unwanted hook and click Force Uninstall to remove it immediately and protect your clean setup against silent background restoration.

Inspecting and uninstalling OpenAI Codex hooks in AI Agent bar

Method 2: Manually Remove Self-Configured Codex Hooks

If you configured a hook yourself in your user or workspace directory, you can edit the configuration directly:

  1. Open ~/.codex/hooks.json / .codex/hooks.json in Finder (Command + Shift + G) or your editor.
  2. Remove the unwanted hook entries under the hooks configuration, save the file, and restart OpenAI Codex.

Why Managed Codex Hooks Reappear After Manual Deletion

When workplace software installs hooks into protected system paths (such as /etc/codex/), background agents monitor those files and overwrite manual deletions within seconds. Using Force Uninstall in AI Agent bar removes the active hook cleanly and prevents silent background reinstallation.