Repository navigation
fix(alias): report an alias child killed by a signal other than INT/TERM - #4523
Merged
Merged
Conversation
v0.80.0 printed "✗ Killed by signal N" when an alias child died by a signal such as SIGSEGV or SIGKILL. Since #4352 and #4400, interrupt classification is limited to SIGINT/SIGTERM, so these deaths reach alias_error_wrapper, which turns every child exit code into a silent AlreadyDisplayed. wt exits 128+N without dying by the signal, so the shell prints nothing either and the crash goes unreported. alias_error_wrapper now maps a child exit with a physical signal to WorktrunkError::Interrupted, the variant custom subcommands already use for the same case, which renders "Killed by signal N" and exits 128+N. SIGINT and SIGTERM still short-circuit in handle_command_error and are re-raised for the shell to report, as AGENTS.md "Signal Handling" specifies. Hooks and wt step for-each already report the signal in their own failure lines. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
worktrunk-bot
approved these changes
Oct 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Since v0.80.0, an alias whose child dies by a signal other than SIGINT/SIGTERM (for example
crash = "kill -KILL $$", or a segfaulting program) exits 128+N with no output. v0.80.0 printed✗ Killed by signal N. #4352 and #4400 limited interrupt classification to SIGINT/SIGTERM, so these deaths now reachalias_error_wrapper, which turns every child exit code into a silentAlreadyDisplayed. wt exits normally rather than dying by the signal, so the shell reports nothing either.alias_error_wrappernow maps a child exit with a physical signal toWorktrunkError::Interrupted, the variant custom subcommands (wt-foo) already use for the same case. It rendersKilled by signal Nand exits 128+N. SIGINT and SIGTERM still short-circuit earlier and are re-raised for the shell to report, as AGENTS.md "Signal Handling" specifies, sokill -TERM $$stays silent from wt. Hooks andwt step for-eachalready report the signal in their own failure lines and are unchanged.Verified with the release-review repros: SEGV and KILL aliases print
✗ Killed by signal 11/9and exit 139 / 137, matching v0.80.0, for single, multi-step and concurrent aliases;exit 2stays silent. The new unix-onlytest_step_alias_killed_by_signalsnapshot fails without the fix.