Make Completion Checks Explicit, and Test Their Limits
The session says the feature is complete, but the build is red. A defined completion check gives you better evidence than that summary.
A Stop hook can run a script and block stopping when its condition fails. Test the actual event, failure response and loop-prevention behavior in your installed Claude Code version. The current workflow guidance describes an override after repeated blocks, so a stop hook is not an unconditional promise that the session will run until every requirement passes.
Keep a durable task state outside the conversation. A process exit, timeout or exhausted budget must leave unfinished work visible.
The check also needs a known failing case. A hook that reliably runs an irrelevant test can still permit the wrong result. Use completion evidence to support an acceptance decision, not to redefine the goal as whatever the script happens to check.