fix(run): suppress duplicate failure output on SSH disconnect (exit 255) (#2186)

When SSH disconnects with exit code 255, the server is still running.
Previously the warn message ("SSH connection lost") was followed by the
full reportScriptFailure block, which was contradictory. Now we return
undefined after the warn so reportScriptFailure is skipped entirely.

Fixes #2185

Agent: issue-fixer

Co-authored-by: B <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
A 2026-03-04 04:16:49 -08:00 committed by GitHub
parent 03cc7f4132
commit 083c103ab9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -576,6 +576,7 @@ function runBashScript(
console.error();
p.log.warn("SSH connection lost. Your server is likely still running.");
p.log.warn("To reconnect, re-run the same spawn command.");
return undefined; // Don't report as failure — user already has clear guidance
}
return errMsg;