在 SSH heredoc 裡 exit 0 會讓遠端 shell 退出,但本地 SSH 進程 試圖繼續餵剩餘 heredoc 內容時收到 SIGPIPE,exitcode 變 1。 改用 HEALTH_PASS flag + break,heredoc 自然結束,避免 SIGPIPE。 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
在 SSH heredoc 裡 exit 0 會讓遠端 shell 退出,但本地 SSH 進程 試圖繼續餵剩餘 heredoc 內容時收到 SIGPIPE,exitcode 變 1。 改用 HEALTH_PASS flag + break,heredoc 自然結束,避免 SIGPIPE。 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>