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

Why a hook deny holds in bypass mode

PreToolUse hooks fire before any permission mode check, so a deny from a hook blocks the tool even under bypassPermissions or dontAsk. An allow from a hook does not override deny rules. Use this to enforce policy that users cannot switch off by changing mode.

Read in this order

  1. OfficialHooks and permission modes (Claude Code hooks guide)States which hook decisions override permission modes and which cannot loosen deny rules.
  2. OfficialPermission modes (Claude Code docs)Explains each mode so you can see where hooks sit in the order.

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.