Intermittent Claude Code CLI Startup Failure This sounds like a potential issue with the Claude Code CLI where: 1. The tool becomes non-functional in specific project directories 2. Restarting or changing directories temporarily resolves the issue 3. The
Bug Description
╰─ claude
Error: write EPIPE
at afterWriteDispatched (node:internal/stream_base_commons:161:15)
at writeGeneric (node:internal/stream_base_commons:152:3)
at Socket._writeGeneric (node:net:958:11)
at Socket._write (node:net:970:8)
at writeOrBuffer (node:internal/streams/writable:572:12)
at _write (node:internal/streams/writable:501:10)
at Writable.write (node:internal/streams/writable:510:10)
at i6.sendToShell (file:///Users/{user}/.bun/install/global/node_modules/@anthropic-ai/claude-code/cli.mjs:343:423)
at file:///Users/{user}/.bun/install/global/node_modules/@anthropic-ai/claude-code/cli.mjs:340:1714
at new Promise (<anonymous>) {
errno: -32,
code: 'EPIPE',
syscall: 'write'
}
╭────────────────────────────────────────────╮
│ ✻ Welcome to Claude Code research preview! │
│ │
│ /help for help │
│ │
│ cwd: /Users/{user}/medicare-portal │
╰────────────────────────────────────────────╯
╭────────────────────────────────────────────────────────────────────────────────────╮
│ > Try "create a util logging.py that..." │
╰────────────────────────────────────────────────────────────────────────────────────╯
! for bash mode · / for commands · esc to undo \⏎ for newline
Total cost: $0.0000
Total duration (API): 0.0s
Total duration (wall): 0.5s
When I'm in a certain directory, not this directory, because I couldn't get it to run, when I'm in a different directory that was working with Claude Code, I made a change with cursor or something into a file and somehow it broke it so Claude won't run in that directory. Tried reinstalling Claude, using different js runtimes, and a whole bunch of things, tried deleting recent files. I had to switch to a different directory in order to be able to launch this so I can file this bug report. In fact, while I was trying to recreate this bug report, it stopped working in a second directory that had been working, so I then had to use it in a third directory just to be able to launch Claude to send this bug report.
Environment Info
- Platform: macos
- Terminal: alacritty
- Version: 0.2.27
- Feedback ID: b72a7688-9568-4735-af6b-70737c204d7b
(happens in regular terminal app too)
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗