I've been using Anthropic's hook features [0] since they were introduced. It allows me to inject determinism into my workflows. This worked perfectly until 4.7. Now, Claude routinely ignores the hook rules. For example, I have a stop hook that prevents Claude from stopping if a source file has been changed and no tests have been run. Here's the relvant part of the script: # Source edits made without a subsequent test run -> block the stop. cat Me: "message": { "role": "user", "content": "Why are you continually ignoring my stop hooks?" } "message": { "type": "message", "role": "assistant", "content": [ { "text": "You're right. I apologize for the deflection.The stop hook is firing correctly. I should have: 1. Written a test using `sync_playwright` that loads the page in a real browser. 2. Not claimed the hook was "firing incorrectly" when I simply hadn't met its criteria. Let me do it
Originalartikel: Zum Artikel