Skip to content

    ← All posts

    Hooks: the instruction the agent cannot ignore

    A rule in CLAUDE.md is followed most of the time, a hook is run by the harness every time. Events, exit 2, JSON output and matchers, three hooks tested with Claude Code (force push to main, em dash, a Stop hook that sends Claude back to work), and why a hook is not a sandbox.

    Spotted an error, something to add?

    Tell me: I read every message and correct the article when needed.

    Your name only appears below the article with this consent, and only if the remark is used. Your address is never published.