Codex App leaks zombie child processes until macOS hits process limit
What version of the Codex App are you using (From “About Codex” dialog)?
26.730.61639
What subscription do you have?
ChatGPT subscription (plan not verified)
What platform is your computer?
macOS 14.1 (build 23B2073), Apple Silicon (arm64)
What issue are you seeing?
Summary
The macOS Codex App / ChatGPT desktop process does not reliably reap local child processes created while Codex runs local tools. The dead children remain as <defunct> processes under the main ChatGPT parent until the app exits.
After enough local tool activity, macOS can no longer create processes. This breaks unrelated Chromium/Electron applications as well as Codex windows.
Observed failure
- Main parent:
/Applications/ChatGPT.app/Contents/MacOS/ChatGPT - The parent accumulated approximately 2,373 direct zombie children.
- macOS per-user process limit: 2,666; observed total process count: 2,901.
- Local commands then failed with:
fork failed: resource temporarily unavailable - Codex showed:
launch-failed, code1003 - Browser/Electron windows also failed to start because they could not create helper processes.
- Fully quitting ChatGPT immediately restored normal behavior and cleared the accumulated zombies.
This is reproducible without an app update: after restarting ChatGPT, approximately 65 direct zombie children accumulated within about two minutes while only a small number of local diagnostic/tool calls were made. This suggests the issue is not limited to one scheduled task, although recurring local tasks make the limit arrive sooner.
What steps can reproduce the bug?
- Launch the current macOS Codex App.
- Run a Codex App task that invokes local shell/tool calls repeatedly, or let a local heartbeat task perform its usual file and data operations.
- Keep ChatGPT open for several hours.
- Inspect direct children of the ChatGPT parent:
ps -axo ppid=,stat= | awk '$1 == <CHATGPT_PID> { all++; if ($2 ~ /^Z/) zombie++ } END { print "children=" all+0, "zombies=" zombie+0 }'
- Observe that the zombie count grows and is not reaped while the parent remains alive.
- Once the per-user process limit is reached, process creation intermittently fails and Codex/browser windows report launch failures.
- Fully quit ChatGPT. The zombies disappear and normal process creation resumes.
What is the expected behavior?
Child processes created for local Codex tool execution should be reaped promptly. A long-running ChatGPT/Codex App session must not consume the macOS per-user process table or prevent unrelated applications from launching helper processes.
Additional information
Environment details:
- macOS 14.1 (build 23B2073), Apple Silicon (arm64)
- Codex App / ChatGPT desktop version 26.730.61639 (confirmed latest by the app)
- The affected workflow included a weekday heartbeat task. Reducing it from four runs per day to one run at 14:30 reduces exposure but does not eliminate the observed leak.
- No user files, prompts, or screenshots are attached because the process-level evidence above is sufficient and avoids sharing private data.
I can provide a process sample or additional diagnostics if maintainers specify a safe collection method.
1 Comment
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action