An agent saying "done" is not the same as a change being shippable. Claude Code hooks give you a deterministic layer around the agent loop: run checks after edits, and block final completion when the repository is not green.
This article shows a practical pattern using PostToolUse and