Run the halt task when max attempts are reached on a failing task

This is the only sensible way to handle recurring failure on a machine with runner in an infinite loop (its intended use case).