Repository navigation
Conversation
On Unix, node-pty reports `signal: 0` when a process exits normally. The exit message turned that into the string "0", which the renderer treats as a real signal: a setup script that exited 0 showed "Setup script failed (0)", and an agent that exited cleanly counted as failed in the task status. Send `null` unless there is a real signal number, and drop the Codex handoff's special case for "0". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Problem
A setup script that exits 0 shows the red badge "Setup script failed (0)" and an error notification.
On Unix, node-pty's
onExitreportssignal: 0when a process exits normally.electron/ipc/pty.tsturned any defined signal into a string (signal !== undefined ? String(signal) : null), so a clean exit reached the renderer assignal: "0", which is truthy. Then:noteSetupShellExit(exitCode === 0 && !signal) marks the setup run failed, andsetupExitLabelshows the signal,0. This affects every successful setup script on Linux and macOS since feat(worktrees): opt-in per-project setup, teardown and include list #349.taskStatus.ts(agent.exitCode !== 0 || agent.signal !== null) counts an agent that exited cleanly as failed.code.signal === '0'.Fix
Send
nullunless node-pty reports a real signal number (signal ? String(signal) : null), so no consumer needs to know about the0quirk. The Codex workaround is removed, since it can no longer be reached.Tests
pty.test.tscases: signal0→null,undefined→null,15→"15". The signal-0 case fails without the fix (expected signal: '0' to match null).npm run checkandnpm testpass (6251 unit + 2637 client tests).🤖 Generated with Claude Code (Opus 5.5)