Skip to content
Technology

hooks

hooks — Technology. role: Commands triggered at fixed points in the Claude Code lifecycle, serving as hard gates independent of the model's decision

A hook is a command triggered at a fixed point in the Claude Code lifecycle, and its defining property is that it runs whether or not the model decided it should. Lint that blocks, a test before commit, secrets withheld from a read: the gate fires every time. PreToolUse and PostToolUse are the events it attaches to, and a Claude Code curriculum dated February 2026 counts 11 or more such events.

Hugo Lassiège puts the reason plainly in "Mon usine logicielle à l'heure de l'IA" (28 July 2026): "Une consigne est suivie 'la plupart du temps'… Un hook ou un test est suivi tout le temps." His grid separates what an agent knows, what it can do deterministically, and what stops it when it goes wrong. hooks sit in that third position, fired by the harness, next to architecture tests and CI gates.

Louis Claxton, of Anthropic's Applied AI team, splits governance into two layers in his AI-native SDLC playbook of 21 August 2026: the skill is an advisory control, the hook the deterministic layer that blocks or demands an approval. Michael Segner's startup guide of 20 August 2026 sends readers to hooks for the same job, the hard gate behind "trust but verify".

Addy Osmani lists hooks among the seven harness primitives, under the maxim "success is silent, failures are verbose". He credits HumanLayer with the reframe that sharpens the stakes: most agent failures are configuration problems, not model limits.

Type
Technology
role
Commands triggered at fixed points in the Claude Code lifecycle, serving as hard gates independent of the model's decision
relations
5
Cited in
2 fiches

Neighborhood

Success is silent fa… harness de l'agent événements PreToolUs… Claude Skills

→ is based on

Success is silent failures are verbose CONCEPT high confidence timeless Source ↗

→ is part of

harness de l'agent CONCEPT high confidence timeless Source ↗

→ applies to

événements PreToolUse et PostToolUse CONCEPT high confidence timeless Source ↗

→ improves

Claude Skills TECHNOLOGIE high confidence timeless Source ↗

Cited in (2)