[BUG] Error: spawn EBADF

Resolved 💬 3 comments Opened Oct 24, 2025 by mbuon Closed Oct 27, 2025

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Error: spawn EBADF
at ChildProcess.spawn (node:internal/child_process:421:11)
at spawn (node:child_process:796:9)
at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:195:2523
at p30 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:195:3018)
at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:195:3251
at Array.forEach (<anonymous>)

What Should Happen?

No message should be displayed.

Error Messages/Logs

Error: spawn EBADF
    at ChildProcess.spawn (node:internal/child_process:421:11)
    at spawn (node:child_process:796:9)
    at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:195:2523
    at p30 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:195:3018)
    at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:195:3251
    at Array.forEach (<anonymous>)

Steps to Reproduce

Just execute a command and after a while I saw:

Error: spawn EBADF
at ChildProcess.spawn (node:internal/child_process:421:11)
at spawn (node:child_process:796:9)
at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:195:2523
at p30 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:195:3018)
at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:195:3251
at Array.forEach (<anonymous>)-

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.0.26

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

activated " ⏵⏵ bypass permissions on (shift+tab to cycle)"

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗