"Error: write EPIPE" error During Bash Command Execution
Resolved 💬 16 comments Opened Jul 18, 2025 by DrBenedictPorkins Closed Jul 19, 2025
💡 Likely answer: A maintainer (wolffiex, collaborator)
responded on this thread — see the highlighted reply below.
Bug Description
Experiencing consistent ClaudeCode PIPE errors resulting in crashes when running bash commands.
A simple Bash(ls -la) or Bash(date) execution causes the issue.
node:events:497
throw er; // Unhandled 'error' event
^
Error: write EPIPE
at WriteWrap.onWriteComplete [as oncomplete] (node:internal/stream_base_commons:95:16)
Emitted 'error' event on Socket instance at:
at emitErrorNT (node:internal/streams/destroy:169:8)
at emitErrorCloseNT (node:internal/streams/destroy:128:3)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
errno: -32,
code: 'EPIPE',
syscall: 'write'
}
Environment Info
- Platform: darwin
- Terminal: Apple_Terminal
- Version: 1.0.55
- Feedback ID: 11c8f576-9b00-454d-9156-ba30e22bf60f
Errors
[{"error":"Error: Command failed: security find-generic-password -a $USER -w -s \"Claude Code\"\nsecurity: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.\n\n at genericNodeError (node:internal/errors:984:15)\n at wrappedFn (node:internal/errors:538:14)\n at checkExecSyncError (node:child_process:891:11)\n at execSync (node:child_process:963:15)\n at q5 (file:///Users/X/node_modules/@anthropic-ai/claude-code/cli.js:727:4693)\n at file:///Users/X/node_modules/@anthropic-ai/claude-code/cli.js:640:41282\n at Q (file:///Users/X/node_modules/@anthropic-ai/claude-code/cli.js:542:14406)\n at PF (file:///Users/X/node_modules/@anthropic-ai/claude-code/cli.js:640:39067)\n at $X (file:///Users/X/node_modules/@anthropic-ai/claude-code/cli.js:640:37933)\n at RB (file:///Users/X/node_modules/@anthropic-ai/claude-code/cli.js:640:43902)","timestamp":"2025-07-18T01:19:12.442Z"}]
16 Comments
Experiencing the same issue when Claude Code (1.0.55) tries to run the Bash command
git statusSame here (running 1.0.55):
node:events:492
throw er; // Unhandled 'error' event
^
Error: write EPIPE
at WriteWrap.onWriteComplete [as oncomplete] (node:internal/stream_base_commons:94:16)
Emitted 'error' event on Socket instance at:
at emitErrorNT (node:internal/streams/destroy:151:8)
at emitErrorCloseNT (node:internal/streams/destroy:116:3)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
errno: -32,
code: 'EPIPE',
syscall: 'write'
}
Node.js v20.10.0
This solution fixes it for me: https://github.com/anthropics/claude-code/issues/3881#issuecomment-3086119036
Doctor:
Thanks for this report everyone. We are going to roll back our stable pointer to 1.0.53 while we debug. 1.0.54 has fixes for problems with shell snapshots being deleted but causes people with large environments.
Does anyone have an example .bashrc or .zshrc that repros this issue?
@wolffiex this is on an Ubuntu 22.04 VM running on MacOS 15.5 (reverting to 1.0.54 did resolve the issue)
and on the Macbook:
and .bash_profile (messy!):
@leocape on the mac, can you run
claude -d?this'll print out a path where we save the snapshot script. the contents of the snapshot script would be immensely helpful with the debugging
@wolffiex sure
snapshot-bash-1752858941724-qtcmgw.sh.zip
Thanks @wolffiex for looking into it. Since I am on v1.0.54 now, not sure if the output of
claude -dwould help so much and I can't roll forward to v1.0.55 right now. Aside from upgrading the version, I gave some specific instructions about parallelism that I thought was the main culprit. But rolling back to v.1.0.54 worked fine. It fails fairly quickly with local environment commands so my intuition indicates a synchronization issue where there might be a missing await for OS level commands or something along those lines. Hope this helps and feel free to ask for more information. Thanks again!This sucks. Haven't been able to use claude code all day! No bash commands, no subagents, can configure anything via Claude...
if you reinstall claude or do
claude updateyou will get a version that doesn't have this issueCurrent version: 1.0.53Checking for updates...
Claude Code is up to date (1.0.53)
Fixed it for me thx
thanks for everyone's patience here. we have a new build. if anyone wants to help verify it, please do
npm i -g @anthropic-ai/claude-code@1.0.56and report backThis issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.