codex - 💡(How to fix) Fix codex app-server saturates macOS syspolicyd, hanging the terminal [4 comments, 3 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openai/codex#19885Fetched 2026-04-28 06:35:37
View on GitHub
Comments
4
Participants
3
Timeline
13
Reactions
0
Author
Timeline (top)
labeled ×5commented ×4unlabeled ×2closed ×1

Root Cause

On macOS, the codex app-server process fork-execs the bundled node helper (Codex.app/Contents/Resources/node_repl) at ~250 per second while working with six subagents. Because that helper does not pass macOS's expected validation category, every exec triggers a full Gatekeeper crypto check. Within a few hours of running Codex, syspolicyd saturates a CPU core, every new shell command stalls for several seconds (zsh interactive startup goes from sub-second to 4+ minutes), and Apple emits the warning "This will likely result in a block in the future."

Code Example

2026-04-27 15:27:45.203127-0400  syspolicyd: [com.apple.syspolicy.exec:default] <private> with PID 29375 violates validation category policy. This will likely result in a block in the future
2026-04-27 15:27:45.207037-0400  syspolicyd: [com.apple.syspolicy.exec:default] <private> with PID 29376 violates validation category policy. This will likely result in a block in the future
2026-04-27 15:27:45.210908-0400  syspolicyd: [com.apple.syspolicy.exec:default] <private> with PID 29377 violates validation category policy. This will likely result in a block in the future
... (sequential PIDs continue at ~250/sec)

---

$ ps -p 53907 -o pid,ppid,etime,command
  PID  PPID     ELAPSED COMMAND
53907 52783    01:22:43 /Applications/Codex.app/Contents/Resources/codex app-server --analytics-default-enabled

---

$ # racing capture of children:
30413 53907 node
RAW_BUFFERClick to expand / collapse

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

26.422.30944 (2080)

What subscription do you have?

Pro ($200/mo)

What platform is your computer?

Darwin 25.2.0 arm64 arm

What issue are you seeing?

On macOS, the codex app-server process fork-execs the bundled node helper (Codex.app/Contents/Resources/node_repl) at ~250 per second while working with six subagents. Because that helper does not pass macOS's expected validation category, every exec triggers a full Gatekeeper crypto check. Within a few hours of running Codex, syspolicyd saturates a CPU core, every new shell command stalls for several seconds (zsh interactive startup goes from sub-second to 4+ minutes), and Apple emits the warning "This will likely result in a block in the future."

Evidence:

2026-04-27 15:27:45.203127-0400  syspolicyd: [com.apple.syspolicy.exec:default] <private> with PID 29375 violates validation category policy. This will likely result in a block in the future
2026-04-27 15:27:45.207037-0400  syspolicyd: [com.apple.syspolicy.exec:default] <private> with PID 29376 violates validation category policy. This will likely result in a block in the future
2026-04-27 15:27:45.210908-0400  syspolicyd: [com.apple.syspolicy.exec:default] <private> with PID 29377 violates validation category policy. This will likely result in a block in the future
... (sequential PIDs continue at ~250/sec)
 $ ps -p 53907 -o pid,ppid,etime,command
  PID  PPID     ELAPSED COMMAND
53907 52783    01:22:43 /Applications/Codex.app/Contents/Resources/codex app-server --analytics-default-enabled
$ # racing capture of children:
30413 53907 node

Quitting Codex immediately ends the violation stream; reopening Codex restarts it. Killing only the codex app-server PID stops the issue until Codex respawns it.

Why this matters beyond performance: Apple's log message ("This will likely result in a block in the future") indicates a future macOS update will outright block these execs, breaking Codex on macOS for all users.

Suggested fix: Either (a) ship a properly Developer-ID-signed, notarized, hardened-runtime helper binary at Contents/Resources/node_repl, or (b) replace fork-exec of the helper with an in-process or persistent-worker pattern so the validation cost is paid once instead of per-call.

What steps can reproduce the bug?

Reproduction:

  1. macOS [version], Codex [version].
  2. Launch Codex, work for multiple hours, especially with multiple subagents on a project.
  3. In any terminal: time zsh -i -c exit — observe wall time of multiple minutes.
  4. ps aux | sort -k3 -rn | head — syspolicyd ~80% CPU, trustd ~20% CPU.

What is the expected behavior?

Running Codex should not noticeably impact system-wide performance. Specifically:

  1. The bundled node_repl helper should be a properly Developer-ID-signed, notarized, hardened-runtime binary so that macOS's syspolicyd can cache its validation result on first execution and skip full crypto verification on subsequent execs.
  2. syspolicyd and trustd CPU usage should remain at idle baseline (typically <5%) while Codex is running, regardless of how long it has been open.
  3. macOS should not log "violates validation category policy. This will likely result in a block in the future" for any binary Codex ships or invokes.
  4. Unrelated terminal sessions and shell commands should remain responsive — time zsh -i -c exit should complete in well under a second, the same as before Codex was launched.

Additional information

I didn't attempt to replicate this with the codex CLI, but using OpenCode, having GPT-5.5 Fast do work is blazing fast compared to within the Codex desktop app (in the realm of ~20x faster for me, a code review went from taking 40 minutes+ to 2-3 minutes)

extent analysis

TL;DR

The issue can be fixed by either shipping a properly signed and notarized helper binary or replacing the fork-exec pattern with an in-process or persistent-worker approach to reduce validation costs.

Guidance

  • The high frequency of fork-exec calls to the node_repl helper binary is triggering repeated validation checks by syspolicyd, leading to performance issues and warnings from Apple.
  • To verify the issue, monitor syspolicyd and trustd CPU usage using ps aux | sort -k3 -rn | head and observe the execution time of shell commands using time zsh -i -c exit.
  • Consider replacing the fork-exec pattern with an in-process or persistent-worker approach to pay the validation cost only once instead of per-call.
  • If shipping a signed and notarized helper binary, ensure it is properly configured to pass macOS's validation category policy.

Example

No code snippet is provided as the issue is related to the execution pattern and binary configuration rather than a specific code block.

Notes

The suggested fix requires changes to the Codex app's architecture or the helper binary's configuration, which may involve significant development and testing efforts. The issue is specific to macOS and may not affect other platforms.

Recommendation

Apply a workaround by replacing the fork-exec pattern with an in-process or persistent-worker approach to reduce validation costs, as this is a more feasible and efficient solution in the short term.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING