Codex CLI Zombie Processes Consuming CPU and Temporary Fix with pkill
I encountered a phenomenon where my MacBook Pro (Apple M1 Max) CPU was pegged at 100%, causing significant performance degradation. When I checked the Activity Monitor to investigate, I found numerous processes with the familiar name codex.
The root cause of this issue has not yet been identified, but since leaving it alone affects the overall machine performance, I decided to apply a symptomatic treatment.
The simplest method is to manually force-terminate the problematic processes.
pkill -f codexIn this article, I introduced the issue of Codex CLI becoming zombie processes that consume CPU, and a temporary workaround using pkill.
This is merely a symptomatic treatment, not a fundamental solution. Since this is likely a bug in Codex CLI itself, I’m considering actions such as investigating related issues on GitHub or compiling and reporting reproduction steps.
If you’re experiencing similar issues, I hope this temporary workaround helps.
That’s all from the Gemba on temporarily dealing with Codex CLI zombie processes using pkill -f codex.