---
title: "Discussion on \"Codex Rules: Control Commands with prefix_rule\" | Hashnode"
description: "Discussion on \"Codex Rules: Control Commands with prefix_rule\". The short version\n\nCodex rules are .rules files that decide, per command prefix, whether a command runs without asking, asks first, or is blocked.\nWhen several rules match one command, the most restri"
url: "https://hashnode.com/posts/codex-rules-control-commands-with-prefix-rule/6af7498220184c233a0d88a6"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Codex Rules: Control Commands with prefix\_rule](https://nixonperinchery.hashnode.dev/codex-rules-control-commands-with-prefix-rule?utm_source=hashnode&utm_medium=feed)

The short version Codex rules are .rules files that decide, per command prefix, whether a command runs without asking, asks first, or is blocked. When several rules match one command, the most restri

Nov 13 · 8 min read · nixonperinchery.hashnode.dev  
Read the article

-   [#codex](https://hashnode.com/tag/codex)
-   [#security](https://hashnode.com/tag/security)
-   [#ai-agents](https://hashnode.com/tag/ai-agents)

## Written by

[Nixon Perinchery](https://hashnode.com/@nixonperinchery)

@nixonperinchery

  
[View profile](https://hashnode.com/@nixonperinchery)

Entrepreneur. Builder. Living inside Claude Code lately..

Entrepreneur. Builder. Living inside Claude Code lately.. Building Atlas: say what you want built, a team of AI engineers builds, tests and ships it.

## Responses 1

Markdown supported · ⌘↵ to post

[Paul Pham](https://hashnode.com/@paulpham157)

[Nov 13](https://hashnode.com/posts/codex-rules-control-commands-with-prefix-rule/6af7498220184c233a0d88a6/comment/6af790331dfc51e53e0f67f7)

The default decision being allow is the one that would bite me. Copy a prefix\_rule, forget the decision line, and it quietly allows the command. The match and not\_match examples that get checked on load seem like a good habit.
