From 6c0b2e93c7908b73610d074da759efc5def1677c Mon Sep 17 00:00:00 2001 From: Garry Tan Date: Sat, 15 Aug 2026 09:11:28 -0700 Subject: [PATCH] =?UTF-8?q?fix(bin):=20gstack-session-update=20=E2=80=94?= =?UTF-8?q?=20detached=20updater=20owns=20its=20stdio=20(SIGPIPE)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The backgrounded update subshell inherited the session hook's stdout/stderr pipes. Once the hook exits and the caller closes them, any child that writes — git pull's autostash notice, setup output — dies of SIGPIPE, logged as PULL_FAILED exit=141 with an empty stderr capture (observed in the free-tests container, and reachable by any production hook runner that closes stdio promptly). Redirect the fork to /dev/null; all observability already flows through the session-update log file. Co-Authored-By: Claude Fable 5 --- bin/gstack-session-update | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bin/gstack-session-update b/bin/gstack-session-update index 4207d84db..513cd6088 100755 --- a/bin/gstack-session-update +++ b/bin/gstack-session-update @@ -146,6 +146,11 @@ fi else log_entry "UP_TO_DATE head=$OLD_HEAD" fi -) & +# The detached subshell must own its stdio: it inherits the session hook's +# pipes, and once the hook exits and the caller closes them, any child that +# writes (git pull's autostash notice, setup output) dies of SIGPIPE — +# observed as PULL_FAILED exit=141 with an empty stderr capture. All +# observability goes through LOG_FILE. +) >/dev/null 2>&1 & exit 0