exit 1 can also mean that the hook itself errored (eg a missing dependency or a bug in the hook script)
so exit with 2 when you want Claude to retry, and send the output to stderr so it can see what went wrong. something like "[your command] >&2 || { echo failed; exit 2; }"
