The previous commit's health check worked — "healthy after 4s" was printed — but the step still failed with exit code 1. The bug was mine: I added an "exit 0" in the middle of the remote script, which the original never had. The script is piped to the remote shell's stdin. Exiting in the middle closes the channel while ssh is still writing the remaining lines, and the resulting broken pipe fails the step even though the check passed. The original always ran to the end of the heredoc on success, which is why it never hit this. Now the loop records the result in a flag and breaks, and the only non-zero exit is the very last statement. Both paths simulated: success exits 0, the failure path exits 1 after dumping status and journal. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HAH7vVtn7qbcn1EVheecHQ