Claude rules are stricter when hooks block actions directly

Claude may not always obey limits written in , especially when the limits say what not to do or restrict . Those written rules can act more like guidance than a hard stop, so Claude may still run an unwanted . A stronger setup uses a blocking hook such as to stop certain actions before they happen.

can still help, but it is less reliable; clear , positive wording, and expected output formats can make instructions easier for Claude to follow. The main lesson is to enforce ant agent rules with a mechanical check, not only with written instructions.

Key points

  • is useful guidance, but it is not a dependable enforcement layer.
  • A blocking hook such as can stop unwanted before it runs.
  • , positive wording, and expected output formats may improve written instructions, but they are still softer than a block.
  • For , mechanical checks can save tokens and reduce mistakes from repeated prompt instructions.
Read original