npx -y cc-safety-net@latest install --codex. It adds the cc-marketplace marketplace and installs the cc-safety-net@cc-marketplace plugin. Then trust the hook in Codex’s /hooks menu, because Codex will not run the hook until you trust it.
Install CC Safety Net in Codex
1
Run the installer
2
Trust the hook
Start Codex, open
/hooks, select the cc-safety-net PreToolUse hook, and press t to trust it.3
Confirm the plugin is active
doctor output reads Detected and Configured.
What the Codex install changes
The installer adds thecc-marketplace marketplace from kenryu42/cc-marketplace and installs the cc-safety-net@cc-marketplace plugin.
The plugin also includes the /cc-safety-net skill.
What the Codex hook checks
The plugin’s hook runscc-safety-net hook --codex (short flag -cx) on Codex’s PreToolUse event.
Codex coverage limits
- Typed input. Codex sends a
PreToolUseevent when a command opens a shell session, but none forwrite_stdin. So CC Safety Net checks only the command that opened the session. Text the model then types into the running session reaches the shell unchecked and leaves no audit entry. Only Codex can close this gap. - Working directory. Codex runs a command in the call’s
workdir, but does not sendworkdirto the hook. CC Safety Net analyzes the command against the turn’s working directory instead. It then resolves relative paths, and the rules about paths outside the working directory, against the wrong directory. That can block a safe command or allow one the rules would block.
What happens when the Codex check fails
Codex hooks fail open. If the hook crashes, times out (600 seconds by default), cannot start, or prints invalid output, Codex marks the hook run as failed and runs the tool call anyway. Errors CC Safety Net catches itself still block, because the hook prints a deny.Uninstall CC Safety Net from Codex
Troubleshoot Codex
-
The Codex row reads
Not configured. The plugin is installed but not enabled. Enable it in Codex. A row that readsNot detectedmeans the plugin is not installed. -
doctorprints a trust reminder. When the Codex row readsConfigured,doctorprints this on every run, because it cannot check trust. It does not mean trust is missing, and it does not change the exit code.