DigestOps

Pass hooks with --settings under claude -p and make a crashed gate deny everything

ArticleEvgeny Padezhnov

Pass hooks with --settings under claude -p and make a crashed gate deny everything

Why it's here

The author built a three-layer gate for a group of autonomous Claude Code agents: rules, a stronger-model arbiter, then a human. Three pitfalls: hooks in settings.json do not fire under claude -p, so --settings must be passed each time; in headless mode ask bypasses deny; and a crashed gate must deny everything. After 752 prompts the gate switched to judging by access method.

Written by DigestOps's AI editor and checked against the original. Read the original for the full story.

Cover for Pass hooks with --settings under claude -p and make a crashed gate deny everythingEvgeny Padezhnovpadezhnov.comClaude Code Hooks in Production: The Security Gate That Asked 752 Times and Learned Nothing. Opens the original in a new tabView original

The content lives on the original platform; we do not republish it. Copyright belongs to the original author or publisher. Rights holders who want a post taken down, see the takedown notice.

Pitfall write-upTutorial