[BUG] node:events:496 throw er; // Unhandled 'error' event ^ Error: write EPIPE
Environment
- Platform (select one):
- [x] Anthropic API
- [ ] AWS Bedrock
- [ ] Google Vertex AI
- [ ] Other: <!-- specify -->
- Claude CLI version: 1.0.55 (Claude Code)
- Operating System: 15.5 (24F74)
- Terminal: Terminal App
Bug Description
The application runs for a while and then crashes with this bug.
node:events:496
throw er; // Unhandled 'error' event
^
Error: write EPIPE
at WriteWrap.onWriteComplete [as oncomplete] (node:internal/stream_base_commons:87:19)
Emitted 'error' event on Socket instance at:
at emitErrorNT (node:internal/streams/destroy:170:8)
at emitErrorCloseNT (node:internal/streams/destroy:129:3)
at process.processTicksAndRejections (node:internal/process/task_queues:90:21) {
errno: -32,
code: 'EPIPE',
syscall: 'write'
}
Node.js v22.16.0
Steps to Reproduce
- Ask Claude to do something
- It crashes. Here's an example of what is was doing before :
Now I need to create the Filament page classes:
Bash(mkdir -p
../app/Filament/Resources/TermsAndConditionsResource/Pages)
⎿ Running…
✳ Cerebrating… (0s · ⚒ 131 tokens · esc to interrupt)
╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ > │
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
? for shortcuts
Total cost: $0.2639
Total duration (API): 1m 33.4s
Total duration (wall): 2m 3.1s
Total code changes: 133 lines added, 0 lines removed
Usage by model:
claude-3-5-haiku: 3.5k input, 93 output, 0 cache read, 0 cache write
claude-sonnet: 469 input, 5.0k output, 238.2k cache read, 30.1k cache write
With the $100/mo Max plan, use Sonnet 4 as your daily driver with predictable pricing. • /upgrade to sign up
node:events:496
throw er; // Unhandled 'error' event
^
Error: write EPIPE
at WriteWrap.onWriteComplete [as oncomplete] (node:internal/stream_base_commons:87:19)
Emitted 'error' event on Socket instance at:
at emitErrorNT (node:internal/streams/destroy:170:8)
at emitErrorCloseNT (node:internal/streams/destroy:129:3)
at process.processTicksAndRejections (node:internal/process/task_queues:90:21) {
errno: -32,
code: 'EPIPE',
syscall: 'write'
}
Node.js v22.16.0
Expected Behavior
Don't crash
Actual Behavior
It crashes
Additional Context
Started happening for the first time today. I think after an update ?
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗