EPIPE Error Handling for Piped Output#
What's wrong with this entry?
Claude Code now gracefully handles broken pipe (EPIPE) errors when output is piped to another process that closes early.
claude -p "list files" | head -1 # No longer crashes if head closes early- Prevents crashes when Claude Code's output is piped to a process that terminates before reading all output
- Automatically destroys stdout/stderr streams on EPIPE instead of throwing an uncaught error
- Improves CLI scripting reliability
HS0() at line 519 (EPIPE handler, contains "EPIPE")
Strings lifted out of the shipped bundle, so the claim above can be checked against them.