EPIPE Crash When Running Claude Code in Python Project Directory
Bug Description
I keep getting EPIPE related crashes when running Claude Code in my Python project directory
e.g.: ❯ claude
Error: write EPIPE
at afterWriteDispatched (node:internal/stream_base_commons:159:15)
at writeGeneric (node:internal/stream_base_commons:150:3)
at Socket._writeGeneric (node:net:971:11)
at Socket._write (node:net:983:8)
at writeOrBuffer (node:internal/streams/writable:570:12)
at _write (node:internal/streams/writable:499:10)
at Writable.write (node:internal/streams/writable:508:10)
at m8.sendToShell (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.mjs:339:243)
at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.mjs:337:1614
at new Promise (<anonymous>) {
errno: -32,
code: 'EPIPE',
syscall: 'write'
Environment Info
- Platform: macos
- Terminal: Apple_Terminal
- Version: 0.2.9
- Feedback ID: 84e869fe-5511-44c8-8fb0-d9652126fc9c
14 Comments
I get similar errors. Generally, when using bash, it crashes or times out. haven't gotten any bash commands to work yet.
I would like to know how to reset Claude Code because it did work initially (with errors)
Removing $HOME/.claude did not solve it
same issue here.
works with sudo though
I think we have a fix for this coming in the next release, unless this is a separate issue. Does it help if you go
SHELL=/bin/bash claudethanks that worked.
awesome! I'll push a new release right now
@wolffiex had the same issue, sudo fixed it, but setting SHELL didn't!
Ok thanks for the report. The shell is finicky beast. We are adding some
logic to fix the case that is addressed by the workaround I posted. For the
folks who need to run sudo, I'm adding some logging that hopefully help us
track this down.
On Tue, Feb 25, 2025 at 1:52 PM Darin @.***> wrote:
I use fish as a shell, but starting with
solved the problem for me
@wolffiex Thanks for the quick fix!
I can confirm it works since the update (without workarounds)
@wolffiex
Thank you! Is there any way I can get those logs to you?
This has been bugging me for days!!
SHELL=/bin/bash claudeworks perfectly. Thank you.This 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.