Codex CLI now keeps running after you close it. Here's what that means and how to turn it off
Since version 0.157.0, opening OpenAI's Codex CLI starts a shared background server that outlives your terminal and updates itself. It's on by default. Here's what it does and the one command to switch it off. If you
Since version 0.157.0, opening OpenAI's Codex CLI starts a shared background server that outlives your terminal and updates itself. It's on by default. Here's what it does and the one command to switch it off.
If you use OpenAI's Codex CLI, close every Codex window and check your running processes. There's a fair chance Codex is still there.
Since version 0.157.0, released on September 25, opening an interactive Codex session also starts a daemon, a program that runs quietly in the background with no window of its own. It keeps running after your last terminal closes. On most setups, it also updates itself.
OpenAI's release notes gave this one line: "Enabled automatic background-server startup for eligible interactive sessions." Developers noticed what that sentence left out, and a GitHub issue asking for it to be opt-in reached the top of Hacker News on October 12.
Here's what actually changed, why it bothers people, and how to switch it off if you want to.
What the background server does
This part comes from OpenAI's own code and docs, not just user reports.
-
It's on by default. In the Codex source code, the setting
daemon_auto_startis marked stable and enabled by default (source). The pull request that made the switch, merged on September 22, is titled simply "Enable automatic daemon startup by default." - It updates itself. According to the daemon's README, it checks for new releases five minutes after starting, then every hour. When it finds one, it restarts, and the README warns that "active or queued work may be interrupted."
-
It runs its own copy of Codex. The daemon runs from a separate package inside your
~/.codexfolder, not necessarily the version you installed with npm or Homebrew. The person who opened the issue measured that copy at about 374 MB. -
It remembers the first terminal's environment. The README says it plainly: shared clients use the environment the daemon started with, and "per-client environment isolation is not provided." Start Codex in a project with one
GH_TOKENor proxy setting, open another project later, and the daemon may still use the first one. Users in the issue thread report hitting exactly this.
Why developers are annoyed
None of this is hidden in a malicious way. The code is open source and the behaviour is written down in the repo. The problem is where it's written down.
A CLI installed through a package manager usually follows a simple deal: it runs when you run it, stops when you close it, and stays on the version you installed. Codex quietly changed all three, behind one release-note sentence. As of today, the opt-out setting doesn't appear in Codex's official CLI docs; users found it in the source and the issue threads. The daemon's own README even still opens with "codex-app-server-daemon is experimental," while the flag that turns it on is marked stable.
There's also the practical side. Windows and WSL users in the thread reported the CLI failing to start at all after the update. Later releases (0.158 through 0.162.1) include a run of fixes for exactly those cases.
The case for it
The daemon has a real job. The README says it backs remote clients "such as the desktop and mobile apps," so one shared backend can serve your terminal, the Codex desktop app and remote sessions at once. If you use those, a long-running shared server makes sense.
The complaint isn't that the feature exists. It's that it's on by default for a terminal tool, without asking once. As of October 13, the issue is still open with no reply from OpenAI in the thread.
How to check, and how to turn it off
We haven't installed Codex for this article. The commands below come from Codex's source code and README; the process check is a standard system command. Run them at your own judgement.
1. Check whether it's running (macOS / Linux):
ps aux | grep -i "codex app-server"
2. Stop it from starting automatically. This writes the setting into your Codex config.toml:
codex features disable daemon_auto_start
Prefer to keep it but skip it for one session? Use codex --no-daemon.
3. Stop the one that's already running:
codex app-server daemon stop
The issue's author reports that this left the hourly updater process running in their case, so run the step 1 check again afterwards.
4. Want the daemon, but no surprise updates? The README documents an "autoUpdateEnabled": false option inside the daemon's settings file (~/.codex/app-server-daemon/settings.json).
One more detail from the changelog: daemon-launched servers turn analytics on by default, matching OpenAI's other apps. The pull request notes you can still opt out with analytics.enabled = false in config.toml.
Desk verdict: If you use Codex only in the terminal, run codex features disable daemon_auto_start and move on. If you use the desktop or mobile app with it, leave it on, but check settings.json so you know when it updates.
Sources: Codex 0.157.0 release notes ยท Issue #48195 ยท PR #47179 ยท Daemon README ยท Feature flag source ยท PR #49426 (analytics) ยท PR #50555 (WSL fix)
The Release Desk ยท by Shabbir Saifee.
facts checked against the primary sources linked above on October 13, 2026.
Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes โ full credit and traffic to the original publisher.