-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Description
Summary
When a csa review subprocess crashes (e.g., SIGTERM, EPIPE), the caller receives zero stdout output and only a generic error message. The subprocess's stderr (containing the actual crash details) is lost because the pipe is already closed when the crash occurs.
Related
Companion to #272 (recursive invocation root cause). This issue focuses on the observability problem: even after #272 is fixed, future subprocess crashes will be equally opaque without better error reporting.
Current Behavior
$ csa review --branch main
# stdout: (empty)
# stderr: "Error: Execution interrupted by SIGTERM"
# exit code: 143 or 144
The actual crash information (Node.js EPIPE stack trace, claude-code-acp error details) is written to the subprocess's stderr but never reaches the caller because:
- CSA sends SIGTERM to the subprocess
- Subprocess tries to write error to stderr → EPIPE (pipe already closed)
- CSA only reports the SIGTERM, not what caused the subprocess to hang/fail
Expected Behavior
$ csa review --branch main
# stderr should include:
# Error: Subprocess 'claude-code' crashed with EPIPE
# Last 10 lines of subprocess stderr:
# node:events:486 throw er;
# Error: write EPIPE at ...utils.js:50:28
# Session: 01KJEVXNPXJSK8JD18AQVPHP27
Suggested Fix
- Keep subprocess stderr pipe open until after the process fully exits
- Capture the last N lines of subprocess stderr before reporting the error
- Include subprocess stderr in the session metadata for post-mortem analysis
- If subprocess exits non-zero, always include its stderr in the error report
Environment
csa 0.1.43 (v0.1.15-38-g718232d-dirty)- Linux 6.1.0-43-amd64
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels