[BUG] zsh: fork failed: resource temporarily unavailable

Resolved 💬 3 comments Opened Oct 16, 2025 by flozano Closed Oct 19, 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?

when claude code tries to run some of my tests, sometimes a storm of forks happens.

the system goes unresponsive because of too many processes and fork failed: resource temporarily unavailable happens in every terminal.

MacOS Sequoia, zsh

$ claude --version
2.0.8 (Claude Code)
$ uname -a
Darwin Franciscos-MacBook-Pro.local 24.6.0 Darwin Kernel Version 24.6.0: Mon Jul 14 11:30:29 PDT 2025; root:xnu-11417.140.69~1/RELEASE_ARM64_T6000 arm64
$ echo "$SHELL"
/opt/homebrew/bin/zsh
$ zsh --version
zsh 5.9 (arm-apple-darwin23.0.0)

What Should Happen?

the process storm should not happen

Error Messages/Logs

501 99402 90018   0  9:58AM ttys008    0:00.00 <defunct>
  501 99403 90018   0  9:58AM ttys008    0:00.00 <defunct>
  501 99404 90018   0  9:58AM ttys008    0:00.00 (pgrep)
  501 99405 90018   0  9:58AM ttys008    0:00.00 (pgrep)
  501 99406 90018   0  9:58AM ttys008    0:00.00 <defunct>
  501 99407 90018   0  9:58AM ttys008    0:00.00 <defunct>
  501 99408 90018   0  9:58AM ttys008    0:00.00 <defunct>
  501 99409 90018   0  9:58AM ttys008    0:00.00 <defunct>
  501 99410 90018   0  9:58AM ttys008    0:00.00 <defunct>
  501 99411 90018   0  9:58AM ttys008    0:00.00 <defunct>
  501 99412 90018   0  9:58AM ttys008    0:00.00 <defunct>
  501 99413 90018   0  9:58AM ttys008    0:00.00 <defunct>
  501 99414 90018   0  9:58AM ttys008    0:00.00 <defunct>
  501 99415 90018   0  9:58AM ttys008    0:00.00 <defunct>
  501 99416 90018   0  9:58AM ttys008    0:00.00 (pgrep)
  501 99417 90018   0  9:58AM ttys008    0:00.00 <defunct>
  501 99418 90018   0  9:58AM ttys008    0:00.00 <defunct>
  501 99419 90018   0  9:58AM ttys008    0:00.00 (pgrep)
  501 99420 90018   0  9:58AM ttys008    0:00.00 <defunct>
  501 99421 90018   0  9:58AM ttys008    0:00.02 (pgrep)
  501 99422 90018   0  9:58AM ttys008    0:00.00 (pgrep)
  501 99423 90018   0  9:58AM ttys008    0:00.00 <defunct>
  501 99424 90018   0  9:58AM ttys008    0:00.00 (pgrep)
  501 99425 90018   0  9:58AM ttys008    0:00.00 <defunct>

Steps to Reproduce

It happens mostly when launching a python test by claude

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.0.8

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

iTerm2

Additional Information

_No response_

View original on GitHub ↗

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