Codex CLI 0.157 starts a background daemon and self-updates by default
A Codex CLI user reports that version 0.157.0 starts a persistent background daemon on every session, copies 374 MB of binaries to its own folder, and launches a self-updating process that keeps running after the terminal closes.
Image: openai/codex on GitHub
Why it mattersA background process that outlives the terminal, pins the first session's environment variables, and updates itself without asking changes the trust model of a tool teams run on their work machines.
A command-line tool should finish when the terminal closes, and the Codex CLI stopped doing that in version 0.157.0.
An engineer named Yihua Liu filed issue #48195 on 25 September 2026, reporting that opening a Codex session starts a persistent background daemon by default. The thread reached the Hacker News front page on 12 October with 506 points, and the issue itself holds 135 upvotes and comments from users on Windows, macOS and Linux saying the same.
What the CLI now does on first use
Opening an interactive codex session starts codex app-server --managed-daemon as a background process. The daemon runs in its own session with no terminal attached, reparents to PID 1, and keeps running after every Codex window closes, until the user explicitly stops it or reboots the machine.
Before running, Codex copies the full platform package into ~/.codex/packages/app-server-daemon/releases/<version>/. Yihua Liu measured this at 374 MB. The package is byte-identical to what npm had just installed, and the daemon runs from the copy. From that point the backend's version is separate from the Codex CLI the package manager put in place.
A second process, codex app-server daemon pid-update-loop, starts detached from the session and checks for updates five minutes after start, then every hour. When a new release is available, it downloads and restarts the backend. The thread links a prior issue, #40969, where this restart has killed active turns mid-run.
What breaks because the daemon outlives the session
The daemon keeps the environment variables of whichever session happened to start it first. Yihua Liu launches Codex through a wrapper that sets HTTPS_PROXY per invocation, and reports that the daemon continues to route outbound connections through the first session's proxy regardless of what later sessions set. The issue also links #42457 and #37537, where the daemon's working directory and terminal diverge from the active session's for the same reason.
Several commenters say the behavior makes Codex unusable in environments where background processes are blocked. On Windows the daemon start-up requires elevation, and a user reports the CLI falls over rather than falling back to local mode. The feature request Liu attaches asks that daemon_auto_start default to false for the CLI, with the shared daemon reserved for the remote-control and desktop clients that need it.
Turning it off, and the bug in that path
The thread documents a workaround with four commands: codex features disable daemon_auto_start, codex app-server daemon stop, a pkill for the update loop, and removing the release folder. The second command stops the app server but leaves the updater process running, which the issue describes as a bug: 70 seconds after the stop, the pid-update-loop was still alive and had to be killed by hand. With the flag off, a new session no longer spawns a daemon.
OpenAI has not changed the default. A team running Codex CLI on developer machines, especially under proxy rules or elevation policies, has a tool that now runs a self-updating background service after the first use, and the opt-out is three commands rather than one.
Source
This item was written by an AI system from the linked source. Reveneau is responsible for what it publishes.
Get AI News in your inbox
New developer tools, model and agent releases, and how teams are actually using them to release software. Short, and only when there is something worth reading.


