Codex App leaves thousands of zombie processes and eventually causes spawn EAGAIN

Open 💬 1 comment Opened Aug 14, 2026 by lqr-hy
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

What version of the Codex App are you using (From “About Codex” dialog)?

26.730.61639

What subscription do you have?

ChatGPT Plus

What platform is your computer?

Darwin 22.6.0 arm64 arm

What issue are you seeing?

The Codex desktop app appears to leave terminated tool subprocesses as zombie processes on macOS.

After using Codex for several hours and running many shell commands/tests, new commands begin failing with errors such as:

spawn sh EAGAIN
fork failed: resource temporarily unavailable

I inspected the process table and found approximately 2,280 zombie (Z, <defunct>) processes. All of them had the same parent process:

/Applications/ChatGPT.app/Contents/MacOS/ChatGPT

The Codex App version is 26.730.61639.

The project processes themselves, including Vite, Electron, Node.js, and esbuild, were still in normal S/S+ states. The zombies were all direct children of the ChatGPT/Codex desktop process.

It appears that child processes created for tool or shell execution are exiting but are not being reaped by the desktop parent process. The zombie count increases over time until the macOS process limit is reached.

Expected behavior:
Exited tool subprocesses should be reaped immediately, and long Codex sessions should not exhaust the process table.

Actual behavior:
Zombie processes accumulate during the session and eventually prevent Codex and other applications from spawning new processes.

Workaround:
Fully quitting and reopening the Codex/ChatGPT desktop app clears the zombie processes. Closing only the task or window does not resolve it.

What steps can reproduce the bug?

  1. Open the Codex desktop app on macOS.
  2. Start a local coding task.
  3. Let Codex execute many shell commands, builds, and test scripts over an extended session.
  4. Check the process table periodically with:

ps -axo pid,ppid,stat,etime,command

  1. Observe that terminated subprocesses remain in the Z state as <defunct>.
  2. Continue using Codex until enough zombie processes accumulate.
  3. Eventually, shell and test commands fail with:

spawn sh EAGAIN

or:

fork failed: resource temporarily unavailable

In my case, approximately 2,280 zombie processes accumulated. Every zombie process had the Codex/ChatGPT desktop process as its parent:

/Applications/ChatGPT.app/Contents/MacOS/ChatGPT

Fully quitting and reopening the desktop app clears the zombie processes temporarily.

What is the expected behavior?

_No response_

Additional information

_No response_

View original on GitHub ↗

1 Comment

github-actions[bot] contributor · 14 days ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #37374
  • #37311
  • #37249
  • #37247
  • #37236

Powered by Codex Action