Codex App Fork Failed on Mac? Clear Zombie Processes

Codex App Fork Failed on Mac? Clear Zombie Processes

Aident AI

An indigo arc holding gray paper shapes is swept by a coral ribbon toward a clear cyan circle.

Codex App Fork Failed on Mac? Clear Zombie Processes

If the Codex app on macOS starts returning fork failed: resource temporarily unavailable and a read-only process check shows a growing set of Z or <defunct> children, save your work and fully quit Codex with Command-Q. Wait for the parent app to exit, verify that the zombie count falls, then reopen Codex with one short task. If the app will not quit normally, use Apple's Force Quit window. Do not kill zombie PIDs one by one, raise macOS process limits, run a cleanup command with sudo, or delete Codex state.

Three public reports opened on August 6, 2026 describe this same boundary: the Codex app accumulates zombie child processes, macOS eventually refuses another fork, and a full app quit clears the process-table entries. One report counted about 2,373 zombies, another about 4,875, and a smaller reproduction reached 77 within two minutes. These reports establish a recurring symptom and a containment step. They do not establish an official OpenAI root cause or a permanent client-side fix.

Confirm the Exact Failure Shape

This guide owns the combination of a macOS fork error and processes whose status begins with Z. Other resource failures need a different diagnostic.

What you observe

Likely boundary

Next step

fork failed: resource temporarily unavailable plus many Z or <defunct> children

Unreaped child-process buildup

Preserve work, fully quit the parent app, and verify cleanup

One Codex process consumes large RAM or swap, but zombie count stays near baseline

Memory growth rather than process-table exhaustion

Use the Codex high-memory guide

A command remains active and still has CPU or I/O activity

Live child process, not a zombie

Stop it through its owning task or program

Only one task is stuck on Running command

Workspace dependency or terminal boundary

Use the stuck command diagnostic

Weekly usage falls rapidly while processes look normal

Metering or retry-loop issue

Use the Codex usage-spike diagnostic

A zombie has already exited. Its parent has not yet collected the child's final status, so the entry remains in the process table. Sending another signal to the zombie cannot make it exit a second time. The useful question is which parent owns the entries and whether restarting that parent makes the count return to baseline.

Capture a Read-Only Snapshot

Stop starting new Codex work, save open editor files, and check the repository before restarting the app:

git status --short
git diff --stat

Then list zombie processes without changing anything:

ps -axo stat=,ppid=,pid=,etime=,command= |
  awk '$1 ~ /^Z/ {print}'

Count them separately so you can compare before and after the restart:

ps -axo stat=,ppid=,pid= |
  awk '$1 ~ /^Z/ {count++} END {print count+0}'

Expected result: the first column begins with Z, and repeated rows share one or a small number of parent PIDs. Record the count, repeated parent PID, Codex version, macOS version, and the last task type. Do not upload the full command column without checking it for local paths, repository names, tokens, or other private data.

To inspect one repeated parent PID, replace 12345 with the numeric PPID from the snapshot:

ps -p 12345 -o pid=,ppid=,etime=,command

If the parent is not part of Codex or ChatGPT, stop here. Quitting Codex will not repair an unrelated process tree.

Quit the Parent App, Not Each Zombie

Use the smallest recovery that matches the evidence:

  1. Stop active Codex tasks and save work in Codex, your editor, and your repository.

  2. Choose Codex > Quit Codex or press Command-Q. Closing the last window is not the same as quitting the app.

  3. Wait for the app to disappear from the menu bar and Dock activity to settle.

  4. Run the zombie count again.

  5. If Codex is unresponsive, press Option-Command-Esc, select Codex, and choose Force Quit. Apple warns that unsaved changes may be lost.

  6. If the parent still cannot exit, restart macOS through the Apple menu after preserving work.

Expected result: the repeated zombie entries disappear or return close to the pre-Codex baseline, and macOS can create processes again. This is containment. It does not prove that the underlying Codex lifecycle bug is fixed.

Avoid shell-wide cleanup commands such as killall, pkill -f, or a loop that kills every process matching codex, node, or bash. A Codex task can legitimately own terminals, development servers, test runners, or other work you do not want to terminate. Do not raise kern.maxproc, change launch limits, or disable macOS protections to make room for a leaking parent.

Verify That the Buildup Does Not Resume

After reopening Codex, do not immediately restore every long-running task and integration. Run a bounded negative control:

  1. Record the zombie count before opening a new task.

  2. Start one short, read-only task with no subagents or background commands.

  3. Let the task finish, then wait five minutes.

  4. Record the count again.

  5. Add one previously active dimension, such as an MCP server, browser task, subagent, or background command, and repeat.

Expected result: the count stays near baseline after the task finishes. If it rises after one dimension returns, you have a useful reproduction boundary. Stop repeating the trigger before process creation fails again.

OpenAI's current Codex app troubleshooting guide recommends restarting the app after active tasks finish when stuck behavior persists. The August issue reports make the extra zombie-count check useful for this exact symptom, but the restart advice remains a workaround until an upstream change is verified.

Report a Small, Sanitized Reproduction

Add evidence to the closest existing issue instead of opening another duplicate. Include:

  • Codex app and macOS versions;

  • the exact fork failed text;

  • zombie count before the task, after the task, and after quitting Codex;

  • the repeated parent process name and PID, without unrelated command lines;

  • whether the trigger used MCP, Computer Use, a subagent, or a background command;

  • whether one fresh read-only task stayed stable;

  • how long the buildup took.

Do not attach raw session files, full process listings, crash archives, screenshots, or command output until you have removed secrets, private prompts, local paths, and repository names.

Retest after a Codex update. Remove the restart containment only when the same bounded workload completes repeatedly, its child processes are reaped, and the zombie count stays near baseline while idle.

Track the Upstream Fix Without Editing Issues

You can use Aident Loadout to check whether the reports were closed, linked to a release, or given a verified workaround without pasting a GitHub token into the agent. Give Codex the canonical setup instruction:

Follow https://aident.ai/SETUP.md

Then use this bounded prompt:

Check my Aident Loadout account and Vault status. Find a connected read-only GitHub issue search Action, inspect its current schema, and preflight it. Return up to five open openai/codex issues that mention fork failed, resource temporarily unavailable, zombie, or unreaped. Include issue number, title, status, and updated time. Do not create or edit issues, post comments, change files, or ask for a provider key.

Success is measurable: you receive at most five current issue records, the Action performs zero GitHub writes, and no credential appears in the prompt or result. Ready to monitor the fix safely? Set up Aident Loadout and run the read-only issue check.

Sources

Refresh this guide when the cited issues change state, OpenAI documents the affected child-process lifecycle, a Codex release verifies a fix, macOS changes its process controls, or the linked Aident setup and diagnostic guides change.

Home

Home

Home

Integrations

Integrations

Integrations

Vault

Vault

Vault

Audit

Audit

Audit

Arana Grande

Arana Grande

Arana Grande

Free

Free

Free

30-day audit summary

30-day audit summary

30-day audit summary

Daily action-call volume and the latest receipts from the Loadout audit trail.

Daily action-call volume and the latest receipts from the Loadout audit trail.

Daily action-call volume and the latest receipts from the Loadout audit trail.

View Audit

View Audit

View Audit

Loadout usage

Loadout usage

Loadout usage

617 action calls in the last 30 days

617 action calls in the last 30 days

617 action calls in the last 30 days

May 19 - Jun 17

May 19 - Jun 17

May 19 - Jun 17

10 active days

10 active days

10 active days

Less

Less

Less

More

More

More

Recent activity

Recent activity

Recent activity

Latest action-call receipts from connected agents

Latest action-call receipts from connected agents

Latest action-call receipts from connected agents

Apr 23, 09:23 AM

Apr 23, 09:23 AM

Apr 23, 09:23 AM

Shopify

Shopify

Shopify

Creates Or Updates An Asset For A Theme

Creates Or Updates An Asset For A Theme

Creates Or Updates An Asset For A Theme

Success

Success

Success

Apr 23, 09:21 AM

Apr 23, 09:21 AM

Apr 23, 09:21 AM

Shopify

Shopify

Shopify

Update Products Param Product Id

Update Products Param Product Id

Update Products Param Product Id

Success

Success

Success

Apr 23, 08:53 AM

Apr 23, 08:53 AM

Apr 23, 08:53 AM

Shopify

Shopify

Shopify

Update Products Param Product Id

Update Products Param Product Id

Update Products Param Product Id

Failed

Failed

Failed

Apr 22, 22:13 PM

Apr 22, 22:13 PM

Apr 22, 22:13 PM

Shopify

Shopify

Shopify

Create Product Image

Create Product Image

Create Product Image

Success

Success

Success

Apr 22, 22:12 PM

Apr 22, 22:12 PM

Apr 22, 22:12 PM

Shopify

Shopify

Shopify

Create Product Image

Create Product Image

Create Product Image

Success

Success

Success

Connected integration coverage

Connected integration coverage

Connected integration coverage

162

162

162

of 753 accessible connected

of 753 accessible connected

of 753 accessible connected

Callable actions

Callable actions

Callable actions

1,126

1,126

1,126

Vault credentials

Vault credentials

Vault credentials

8

8

8

Explore what's possible

Explore what's possible

Explore what's possible

See all Integrations

See all Integrations

See all Integrations

Google Ads

Google Ads

Google Ads

All available Goolge Ads tools via...

All available Goolge Ads tools via...

All available Goolge Ads tools via...

X (twitter)

X (twitter)

X (twitter)

All available X tools via...

All available X tools via...

All available X tools via...

Github

Github

Github

All available Github tools via...

All available Github tools via...

All available Github tools via...

Notion

Notion

Notion

All available Notion tools via...

All available Notion tools via...

All available Notion tools via...

Slack

Slack

Slack

All available Slack tools via...

All available Slack tools via...

All available Slack tools via...

Firecrawl

Firecrawl

Firecrawl

All available Firecrawl tools via...

All available Firecrawl tools via...

All available Firecrawl tools via...

753 integrations are available for loadouts.

753 integrations are available for loadouts.

753 integrations are available for loadouts.

The one tool

for every tool

your agent needs.

Give any AI agent real capabilities in seconds. Connect 1,000+ tools once, skip the setup headache, and let your agents execute.

Try Aident Loadout

Give your Agent real capabilities in minutes. Connect 1,000+ tools, and let your agents execute.

Try Aident Loadout

Give your Agent real capabilities in minutes. Connect 1,000+ tools, and let your agents execute.

Try Aident Loadout

Give your Agent real capabilities in minutes. Connect 1,000+ tools, and let your agents execute.