The final writeHookOutput('SessionStart', ...) call was the only operation
in the file outside a try/catch. writeHookOutput ends in a bare
process.stdout.write, so a closed stdout / broken pipe (EPIPE) at hook exit
throws uncaught and crashes the hook with a non-zero exit code. Wrap it to
match the file's existing never-block-session-start posture.
This commit is contained in:
@@ -71,4 +71,8 @@ if (!isCodex) try {
|
||||
// Silent fail — don't block session start over statusline detection
|
||||
}
|
||||
|
||||
writeHookOutput('SessionStart', mode, output);
|
||||
try {
|
||||
writeHookOutput('SessionStart', mode, output);
|
||||
} catch (e) {
|
||||
// Silent fail — stdout closed/EPIPE at hook exit must not surface as a hook failure
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user