Codex CLI's hidden daemon survives closed terminals and updates on its own

The command-line tool silently spins up a self-updating daemon starting with version 0.157.0, and users on GitHub say it survives closed sessions and resists simple shutdown commands.

AIVIO News Desk 2 min read
AIVIO News cover illustration for: Codex CLI's hidden daemon survives closed terminals and updates on its own

OpenAI’s Codex CLI, a command-line coding assistant, has been installing a background daemon (a program that keeps running independently of any open terminal) without asking users, according to a bug report filed on the project’s GitHub page as issue 48195. The report says the behavior began in version 0.157.0 and was confirmed by users on Windows, Linux and WSL2, a tool that runs Linux software inside Windows.

Opening an interactive Codex session starts a process called codex app-server —managed-daemon, the report says. It runs with no terminal attached and is reassigned to the operating system’s root process, so it keeps running after every Codex window is closed. The only ways to stop it, according to the report, are a manual command or a reboot.

The daemon also copies the entire platform package, about 374 megabytes of files including the Codex binary and bundled tools, into its own folder in the user’s home directory, and runs from that copy instead of the one the user’s package manager installed. A separate, detached updater then checks for new releases five minutes after startup and hourly after that, downloading and installing updates on its own. The report links that update process to a separate, previously filed issue, number 40969, which says an active coding task gets 60 seconds to finish before the daemon forces it to stop. A bug in the shutdown command compounds the problem: the report says codex app-server daemon stop halts the daemon itself but leaves the update-checking process running in the background.

The report also says the daemon locks in the environment settings of whichever session first started it, including proxy variables such as HTTPS_PROXY, so sessions launched afterward with different settings still route through the first session’s proxy. Commenters on the thread, who confirmed the same behavior on Windows 10 LTSC and other systems, raised a related concern: once the CLI copies and updates itself without the user’s package manager knowing, the binary handling a given coding task may no longer match what the user explicitly installed. Some commenters compared the pattern to the characteristics of malware.

Several commenters said setting daemon_auto_start to false in the CLI’s config.toml file stops a new session from creating a daemon at all, and argued that behavior should be the default, with the always-on daemon reserved for Codex’s desktop app or its Remote Control feature. The repository’s commit history shows multiple commits referencing issue 48195 between late September and mid-October, including ones titled “disable daemon auto-start by default” and “keep Codex from starting its self-updating background daemon.” It is not confirmed from the GitHub thread whether any of these commits have shipped in a released version, and the thread notes that OpenAI’s published configuration reference still does not document the daemon_auto_start setting.

Users deciding whether to update Codex CLI can check their version’s release notes for daemon-related changes, or set daemon_auto_start to false in config.toml as a precaution until OpenAI confirms whether the default has changed.

Sources

  1. Codex CLI installs a persistent, self-updating background daemon by default Hacker News

AI-generated · AIVIO News Desk