Draft
Fix Claude Code CLI abnormal exit (code 159): classify fatal-signal crashes in harness retry logic#52837
Conversation
…e harness retry logic Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix Claude Code CLI abnormal exit (code 159)
Fix Claude Code CLI abnormal exit (code 159): classify fatal-signal crashes in harness retry logic
Aug 15, 2026
Contributor
PR TriageCategory: bug | Risk: medium | Score: 66/100
Recommended action:
|
This was referenced Aug 15, 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.
Avenger's Claude Code CLI step crashed with exit code 159 (128+31 = SIGSYS) twice in one day. The harness only special-cased SIGKILL(137)/SIGTERM(143) as non-
--continue-able termination signals; any other fatal-signal crash (SIGSYS, SIGSEGV, etc.) fell through to the generic "partial execution" retry path, which resumes the exact on-disk session via--continue— risking an immediate repeat of whatever crashed it.Changes
actions/setup/js/claude_harness.cjs: added aCRASH_SIGNAL_EXIT_CODESmap for known fatal-signal exit codes (SIGILL=132, SIGABRT=134, SIGBUS=135, SIGFPE=136, SIGSEGV=139, SIGSYS=159), withisCrashSignalExitCode()andcrashSignalNameForExitCode()helpers.shouldRetryWithContinue()now treats these crash codes like the existing SIGKILL/SIGTERM handling —--continueis disabled and the next attempt starts a fresh session instead of resuming corrupted state.crashSignal=SIGSYS) alongside the exit code, giving future occurrences a clearer trail without requiring a core dump.shouldRetryWithContinuebehavior on crash exit codes (134/139/159).