By Vero SecurityBuilt and funded by Vero Security, the AI Security Engineering platform.Read the charter

Rule syntax and precedence

Most agents evaluate deny before ask before allow, and match a rule by tool name plus a pattern for the command, path, domain or MCP tool. Small details matter, such as how compound shell commands, wrappers, redirects and symlinks are matched. Read each vendor's matching rules before you trust a pattern to block what you intend.

Read in this order

  1. OfficialClaude Code: Configure permissions (rule syntax)Start here: precedence order and pattern syntax, including compound commands.
  2. OfficialGemini CLI: Policy engineHow Gemini CLI writes and orders policy rules, for side-by-side comparison.
  3. OfficialCodex: RulesCodex's command-level allow, prompt and forbid decisions, with matching rules.

Save your progress

We email you a sign-in link. No password.

By signing in you agree to the terms. The privacy policy explains how we use your details.

Join the AI security engineering community

Free. Roadmap updates, chapters near you, and first word when credentials open.

We’ll email you community updates. Unsubscribe anytime. By sending this you agree to the terms. The privacy policy explains how we use your details.