# Codex using high CPU or memory on a Mac? How to find the cause

Canonical page: https://vitalsmac.com/codex-high-cpu-mac

By Atta Ur Rehman Shah, maker of Vitals. Published October 3, 2026.

**Short answer:** Codex comes as a desktop app and as a command-line tool, and both start other processes as they work: the commands a task runs, dev servers, tests and MCP servers. High CPU usually means a task is running something heavy or a command is stuck; high memory usually means a thread that has been open a long time. Stop the task, quit Codex fully and open it again, and update it: your threads are kept. Vitals, a system monitor for the Mac, lists every process working in each project folder and tells you when one holds the CPU for minutes.

## How to find what Codex is doing

1. Open Activity Monitor, click CPU, and type codex in the search field. The desktop app shows as Codex with helper processes; the command-line tool shows as `codex` under your terminal app.
2. Choose View → All Processes, Hierarchically, and open the triangle beside Codex or your terminal. What sits underneath is what a task started: a build, a test run, a dev server.
3. If one of those is the busy one, stop the task in Codex. If it keeps running after the task has stopped, select it in Activity Monitor and click the stop button in the toolbar.
4. If Codex itself is the busy or large one, quit it with ⌘Q and open it again. In the terminal, quit and run `codex resume` to pick the thread up where it stopped.
5. Update Codex. The app updates from its own menu; the command-line tool with the package manager you installed it with.

If `syspolicyd` or `trustd` is busy at the same time as Codex, that is macOS checking programs as they are launched. It settles by itself when the task stops starting new ones; a restart of the Mac clears it if it does not.

Codex works by running things: it reads your project, runs commands in a sandbox, builds, tests, and checks the result. That is real work for the CPU, and a Mac that is warm while a task is running is doing what was asked. The cases worth fixing are different: CPU that stays high after the task has finished, memory that climbs for as long as a thread stays open, and processes that carry on after Codex has quit. The table sorts them out.

## Where Codex’s CPU and memory go

| What you see | What it is | What to do |
|---|---|---|
| High CPU while a task runs | The build, tests or script the task is running | Normal; it ends with the task |
| High CPU with no task running | A command that did not stop, or the app stuck | Quit what the task started; restart Codex |
| Codex using many GB | A thread open for a long time | Quit and reopen; your threads are kept |
| `syspolicyd` or `trustd` at high CPU | macOS checking each program a task launches | Settles when the task stops; restart the Mac if not |
| Processes left after Codex quits | A dev server, a watcher or an MCP server | Quit them in Activity Monitor |

## A task that is doing real work

Compiling a project or running a test suite uses every core it can get, whoever asked for it. If Codex starts a build, the build’s processes, not Codex, are at the top of Activity Monitor, and the fans follow. That is the cost of the task. Running several tasks at once, each in its own copy of the project, multiplies it: three builds in parallel are three builds.

## When it does not stop

People report on Codex’s issue tracker that the app or one of its workers sometimes keeps a core busy, or grows to many gigabytes, during an ordinary session. The fixes that work are the plain ones: stop the task, quit Codex, open it again, and update. Threads are saved as you go, so restarting costs a few seconds, not your work.

Check for leftovers after quitting. A dev server or file watcher that a task started is an ordinary process and does not always end with it. Sort Activity Monitor by % CPU and by Memory, and look for `node` and other tools from your project that you did not start yourself.

## syspolicyd and trustd

macOS checks a program’s signature when it is launched. A task that launches hundreds of small programs in a minute, as builds and test runs do, keeps [syspolicyd](https://vitalsmac.com/glossary/syspolicyd) and [trustd](https://vitalsmac.com/glossary/trustd) busy doing those checks. They are part of macOS and are not something to quit. They calm down when the launching stops, and a restart of the Mac clears a check that has got stuck.

## What Vitals adds

Vitals shows which project the work belongs to, and tells you when it has gone on too long.

- A Projects tab: every process working in a project folder, whichever app started it, with memory, CPU and energy for the project as a whole
- Codex as one row with its helpers counted in, and its total memory and CPU
- A notification when an app holds the CPU for minutes or its memory keeps growing
- Dev servers left running idle are pointed out, with an offer to stop them
- When the fans are on, the apps behind the heat, with Quit beside each

Good to know:

- Vitals shows processes and what they use. It does not know which Codex task started which command.
- Vitals never quits anything by itself.

Vitals is $9 during the launch, $29 after it, once: [vitalsmac.com](https://vitalsmac.com/).

## Questions people ask

### Why is Codex using so much CPU on my Mac?

Usually because a task is running a build, tests or a script, which is real work. If CPU stays high with no task running, quit what the task started, restart Codex and update it.

### Why is Codex using so much memory?

A thread that stays open for a long time grows. Quit Codex and open it again; threads are saved, and `codex resume` picks one up in the terminal.

### Why is syspolicyd using high CPU when Codex runs?

macOS checks each program as it is launched, and a task that launches many keeps syspolicyd busy. It settles when the task stops. Do not quit it; restart the Mac if it stays stuck.

### Does restarting Codex lose my work?

No. Threads and the changes a task made to your files are kept. Reopen the app, or run `codex resume` in the terminal.

### Why is my Mac hot after Codex has finished?

Something a task started is still running, most often a dev server or a file watcher. Sort Activity Monitor by % CPU and quit it.

### Is there an app that shows what Codex is running on my Mac?

Vitals has a Projects tab that lists every process working in each project folder, with memory, CPU and ports, and tells you when one holds the CPU for minutes.

In the glossary: [syspolicyd](https://vitalsmac.com/glossary/syspolicyd), [trustd](https://vitalsmac.com/glossary/trustd), [% CPU](https://vitalsmac.com/glossary/cpu-percent), [Memory pressure](https://vitalsmac.com/glossary/memory-pressure), [Listening port](https://vitalsmac.com/glossary/listening-port).

More guides: [Why is my Mac so slow](https://vitalsmac.com/why-is-my-mac-so-slow), [What’s draining my Mac’s battery](https://vitalsmac.com/mac-battery-draining-fast), [Which app is using my CPU or memory](https://vitalsmac.com/check-cpu-memory-usage-mac), [Why won’t my Mac sleep](https://vitalsmac.com/mac-wont-sleep), [Chrome using too much memory](https://vitalsmac.com/chrome-using-too-much-memory-mac), [Why are my Mac’s fans so loud](https://vitalsmac.com/mac-fan-loud), [How to control fan speed on a Mac](https://vitalsmac.com/mac-fan-control), [How to free up RAM on a Mac](https://vitalsmac.com/free-up-ram-mac), [Docker using too much memory](https://vitalsmac.com/docker-using-too-much-memory-mac), [How to stop Docker containers](https://vitalsmac.com/stop-docker-containers-mac), [Volume mixer for Mac](https://vitalsmac.com/mac-volume-mixer), [Cursor using high CPU](https://vitalsmac.com/cursor-high-cpu-mac), [Claude Code using too much memory](https://vitalsmac.com/claude-code-memory-usage-mac), [Claude app using high CPU](https://vitalsmac.com/claude-desktop-high-cpu-mac), [Ollama using too much memory](https://vitalsmac.com/ollama-memory-usage-mac), [Activity Monitor alternatives](https://vitalsmac.com/best-activity-monitor-alternatives), [iStat Menus alternatives](https://vitalsmac.com/best-istat-menus-alternatives), [Stats alternatives](https://vitalsmac.com/best-stats-alternatives), [Task Manager for Mac](https://vitalsmac.com/task-manager-for-mac), [Best system monitors for Mac](https://vitalsmac.com/best-system-monitor-for-mac), [Best menu bar monitors for Mac](https://vitalsmac.com/best-menu-bar-system-monitor-for-mac), [Best volume mixers for Mac](https://vitalsmac.com/best-volume-mixer-for-mac).
