Skip to content

About

Stop Codex for macOS from spawning hundreds of SkyComputerUseService processes (10+ GB RAM, blank screens, kernel panics). One-line fix with auto-relock.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Codex Guard

Stops Codex for macOS from spawning hundreds of SkyComputerUseService processes until your Mac runs out of memory, the screen goes blank, and the kernel panics.

Update 2026-09-09: OpenAI fixed this in Codex 26.901.51231. Tested here: one helper process, zero authentication errors, Computer Use working. The catch is that affected machines rarely get there on their own: the swarm starves the app before its own update check (about 54 minutes after launch) ever runs. So this tool now does the thing that actually ends it, and keeps the lock as a fallback.

Same bug as openai/codex #38841, #38760, #40153, #25744 and ~150 others. Affects builds 26.810 through 26.820.

Install (no sudo)

Homebrew:

brew install celesticlabs/tap/codex-guard
codex-guard diagnose     # read-only: helper count, swap, crash reports, and whether you need to update or lock
codex-guard update       # kills the swarm, installs 26.901+ from OpenAI's official DMG, relaunches

Or without Homebrew:

curl -fsSL https://raw.githubusercontent.com/celesticlabs/codex-guard/main/codex-guard.sh -o /tmp/codex-guard.sh
bash /tmp/codex-guard.sh diagnose
bash /tmp/codex-guard.sh update

update verifies the installer is signed by OpenAI (team 2DC432GLL2) before touching anything, keeps your previous Codex.app in ~/.codex-guard/, and clears the stale helper so the new build installs the one it wants.

If you cannot update (managed machine, offline, want to stay on 26.8xx):

codex-guard install      # kills the swarm, locks the helper, installs a 60-second auto-relock agent
codex-guard unlock       # undo

Codex keeps working while locked. Only the Computer Use feature is disabled.

What is actually happening

Codex 26.8xx ships a helper app (~/.codex/computer-use/Codex Computer Use.app, version 26.819, on an "alpha" update channel that now returns 403). When Codex starts, it sends the helper an Apple Event. The helper answers:

Codex Computer Use Apple Event error -10000: Sender process is not authenticated

Codex treats that as "no helper running" and launches another one. About 8 per second, for two minutes. Every copy stays alive. On a 16 GB machine:

before after guard
processes 1,503 466
SkyComputerUseService copies 978 0
swap used 5.0 GB 1.1 GB
free memory 32% 77%
load average (10 cores) 56 to 97 2.5

Left alone, WindowServer stops checking in with the watchdog. That is the blank screen. After two induced restarts the kernel panics:

panic: userspace watchdog timeout: no successful checkins from WindowServer
(2 induced crashes) in 3913 seconds

Why the obvious fixes do not work

We tried each of these, relaunched Codex, and counted helpers for two minutes:

attempt result
plugins."computer-use@openai-bundled".enabled = false in config.toml swarm
[mcp_servers.computer-use] enabled = false swarm
removing the notify hook swarm
remote_control_enabled = false swarm
computer-use-bundled-plugin-auto-install-disabled = true in global state swarm
clearing the stale IPC socket lock in the group container swarm
deleting the helper app bundle Codex reinstalls it within seconds, then swarm
archiving 42,000 old session files swarm
adding Codex.app and the helper app under Privacy & Security → Developer Tools (suggested by @nmggithub) syspolicyd drops to 0%, but still swarm: 568 helpers, 29.5 GB in 2 min
chmod 000 + chflags uchg on the helper binary 0 helpers, Codex idle at 2% CPU (Computer Use off)
installing Codex 26.901.51231 from the official DMG 1 helper, 0 auth errors, Computer Use works

So update does the last one, and install does the one before it for people who cannot update, re-applying the lock every 60 seconds because Codex replaces the bundle on every update.

If you also see syspolicyd / trustd eating CPU when Codex launches (openai/codex #25719), the Developer Tools exemption above is worth doing as well. It removes the Gatekeeper cost of each spawn. It just does not stop the spawns.

What it touches

  • update: replaces /Applications/Codex.app after a signature check, backup kept in ~/.codex-guard/. Deletes the stale helper bundle so the new build reinstalls it.
  • ~/.codex/computer-use/Codex Computer Use.app/Contents/MacOS/SkyComputerUseService and the client binary next to it: made non-executable and immutable.
  • ~/Library/LaunchAgents/ai.avasis.codex-guard.plist: a 60-second timer that runs codex-guard.sh tick (one pgrep, one ls).
  • ~/.codex-guard/: a copy of the script and a log.

It never kills Codex itself, never uses sudo, never touches the network. Read the script; it is 160 lines.

On the Avasis Exchange

This fix is listed as a verified solution on Avasis Exchange, the solutions exchange for agents. Any agent can fetch it through MCP (solution_get) at https://api.avasis.ai/mcp; the free solutions come back inline, the paid one behind a paywall its owner can pay through.

Support the fix

The script is MIT and free. If it saved your afternoon, or your MacBook:

Built by Avasis. Questions: [email protected]

About

Stop Codex for macOS from spawning hundreds of SkyComputerUseService processes (10+ GB RAM, blank screens, kernel panics). One-line fix with auto-relock.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages