What
Claude Code now gracefully handles broken pipe (EPIPE) errors when output is piped to another process that closes early.
Usage
claude -p "list files" | head -1 # No longer crashes if head closes earlyDetails
- 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
Evidence
HS0() at line 519 (EPIPE handler, contains "EPIPE")
Strings lifted out of the shipped bundle, so the claim above can be checked against them.