Who it is forA security lead who has tested a detection in monitor mode and now wants a Codex pre-action block for one behavior.
The problemShipped rules only monitor, so a confirmed high-risk action such as writing SSH authorized keys still runs unless an operator adds a blocking policy.
The outcomeA controlled operator rule directory where the chosen detection denies matching Codex actions, with enforcement decisions written to the record stream.
What you need first
- A macOS, Linux, or Windows machine with a terminal
- The numbat binary, from a release download or Go 1.26.9 or newer
- At least one supported agent installed, such as Codex or Claude Code
- Permission to read the agent's local session files and, for live capture, to change its hook configuration
Steps
- Copy the complete shipped YAML for the target rule from the rules directory into a new operator folder, such as ./numbat-policy.
- Keep the same rule id, add
enforce: true, and bump the rule version. - Run
numbat rules check --rules-dir ./numbat-policyand fix any validation errors. - Run
numbat hook install --agent codex --emit all --rules-dir ./numbat-policy --enforce. (inferred, check the README) - Review and trust the updated Codex hook in
/hooksor Settings > Hooks, then test with a harmless match and confirm an enforcement record appears.
Prompt for your agent
Use the repo perplexityai/numbat. Copy the shipped YAML for <rule-id> from rules/ into ./numbat-policy, set enforce: true and a new version, then run `numbat rules check --rules-dir ./numbat-policy`. Report whether validation passes and which rule ids are active. Verify that the enforcement record uses mode "enforce" only for the rule you marked, and that all other shipped rules remain monitor-only.
Caveat. Enforcement applies only to supported synchronous pre-action hooks and only to rules marked enforce: true, so check the coverage matrix before relying on a block.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for perplexityai/numbat and "Block a risky Codex action with a custom deny rule"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer