Harness Engineering 6 months ahead, in a few hours.

Module 05 — Hooks & automation

In this module

You'll understand why CLAUDE.md is not enough and how hooks deliver deterministic guarantees. You'll know how to wire in security guardrails, automate linting after each edit, and force checks before the agent considers its work done.

5.1 — Stochastic vs Deterministic: why hooks exist

Since the start of this training, you've been configuring Claude Code with CLAUDE.md files, project instructions, and team conventions. All of that works — most of the time. The fundamental problem: CLAUDE.md is advisory. Claude reads it, interprets it, and does its best. But "its best" is not a guarantee. An LLM can forget an instruction, misinterpret it, or decide it doesn't apply in a given context.

Hooks solve this problem. They are shell commands or LLM prompts that run automatically at precise points in the Claude Code lifecycle. They aren't "suggested" — they are executed. When you configure a hook that blocks file deletions, that hook will run on every attempt, no exceptions.

Locked content

Unlock the full course to access this module.

Unlock

Already purchased? Recover access