DigestOps

Block dangerous commands outside the model: 37 PreToolUse hook rules after four incidents

ArticleMarcus Pichler

Block dangerous commands outside the model: 37 PreToolUse hook rules after four incidents

Why it's here

Running several Claude Code sessions in parallel in a home lab, the author still had incidents after writing rules into memory, so blocking moved outside the model. A PreToolUse hook matches 37 dangerous commands and explains the incident behind each, ops keys cannot get shutdown permission, ArgoCD self-healing reverts manual changes, and 83 regression cases back it up.

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

Cover for Block dangerous commands outside the model: 37 PreToolUse hook rules after four incidentsMarcus Pichlerpichler.devAI Agents on Real Infrastructure: Four Incidents, 37 Rules. 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