# Lydia Hallie explains Claude Stop hook exit codes

> Original title: You can use a Stop hook to have Claude try again when a check fails, but make sure it exits with code 2!

- Source: Lydia Hallie
- Published: 2026-11-13T18:43:37.000Z
- Bad Influence: https://badinfluence.news/items/fh3lqrcdc63rhnxfd6sy7kv9x
- Original: https://x.com/lydiahallie/status/2121313048820617645

## Summary

Lydia Hallie explains that Claude retries a failed check when a Stop hook exits with code 2, using the hook’s stderr. Exit code 1 is non-blocking, so Claude finishes even if the check failed.

## Post

You can use a Stop hook to have Claude try again when a check fails, but make sure it exits with code 2!

Exit 2 sends Claude back to retry with the hook's stderr, exit 1 is non-blocking so Claude just finishes even when the check failed

![](https://badinfluence.news/api/img-proxy?u=https%3A%2F%2Fpbs.twimg.com%2Fmedia%2FHXBnoh4bsAEGfOp.jpg&mode=thumb&exp=1795651200&sig=2df69bb36267de59)
