Since version 0.157.0, released on September 25, 2026, OpenAI's Codex CLI starts a background "app-server" daemon whenever you open an interactive session. According to user reports, that daemon keeps running after you close Codex and updates itself on its own schedule. You can turn it off: disable the daemon_auto_start feature, stop the running daemon, make sure its updater process has exited too, and optionally delete the roughly 374 MB package copy it leaves in ~/.codex. The rest of this guide covers what changed, what the daemon actually does, the problems people are reporting, and how to decide whether to keep it.
What changed in Codex CLI 0.157.0
The rust-v0.157.0 release notes give the change one line under New Features: "Enabled automatic background-server startup for eligible interactive sessions." The changelog links it to PR #47179, "Enable automatic daemon startup by default." The same release added "explicit recovery for incompatible background servers" and enabled /import in local daemon sessions. In other words, OpenAI shipped the daemon knowing that version and settings conflicts could happen.
The same day, a user on Linux under WSL2 opened issue #48195, titled "make daemon_auto_start opt-in — a persistent, self-updating background daemon shouldn't be the default." On October 12 it reached the Hacker News front page and passed 500 points, with hundreds of comments. As of October 13 the issue is still open, and no OpenAI maintainer has replied in the thread.
One more piece of context: OpenAI's own changelog entry for September 5, 2026 says "the app-server command is experimental and isn't supported for production workloads." That is the same subsystem now starting by default on developer machines.
What the daemon actually does
The issue reporter, with details later repeated by Developers Digest and byteiota, describes four behaviours. OpenAI's public docs don't confirm these, so treat them as user observations, but several people in the thread reproduced them.
| Behaviour | Details reported | Why it matters |
|---|---|---|
| Persistent process | codex app-server --managed-daemon runs detached, with no TTY, and survives after every Codex window closes |
A long-lived process with your credentials keeps running when you think Codex is off |
| Private package copy | Copies the full platform package (about 374 MB, including bundled bwrap, zsh, rg) into a per-version folder under ~/.codex/packages/app-server-daemon/releases/ |
The backend's version is no longer controlled by npm, Homebrew or your distro |
| Self-updater | A detached codex app-server daemon pid-update-loop checks for updates 5 minutes after start, then hourly, and restarts the backend |
Updates can land in the middle of a session |
| Frozen environment | The daemon keeps the environment variables of whichever session started it, such as HTTPS_PROXY |
Later sessions in other projects or worktrees inherit settings they never asked for |
According to the issue, there's also a bug on 0.157.0: codex app-server daemon stop stops the server but leaves the pid-update-loop updater running, so you have to kill it by hand.
The problems users are reporting
Most of the anger in the thread is about defaults and consent. But several separate GitHub issues describe concrete failures that affect anyone running Codex for real work.
Updates that kill running turns
Issue #40969, opened August 26, 2026 against the remote-control setup, says that when an update arrives the daemon sends SIGTERM, waits a 60-second grace period, and then sends SIGKILL. The reporter says that's far too short for agent turns that run 3 to 30 minute build or test suites. A second reporter on macOS (0.152.0 to 0.152.1) lost a session that had been running for about 4 hours 45 minutes. The issue also says there was no supported way to turn off auto-update.
Daemon newer than the client
Issue #51763, opened October 7, describes the reverse problem. The installed CLI was 0.160.1, but the daemon auto-updated to 0.161.0 in the middle of a turn. The turn failed with Server is draining; retry after reconnecting (code -32600), and new sessions were then blocked with "Background server has incompatible feature settings." A second user tracked the cause to the api_key_model_discovery default changing from false to true between the two versions. The 0.162.1 release, published October 9, fixed "startup failures caused by differences between a running background server's feature settings and CLI defaults." That addresses this symptom, but the daemon still auto-starts by default.
Daemon older than the client
Issue #49418, opened September 30, reports the opposite drift: users upgrade the CLI, but the daemon stays on an old version. The reported pairs include CLI 0.159.2 with daemon 0.157.1, and CLI 0.160.0 with daemon 0.157.1. codex --version shows the new number, so people believe they're testing a fix that the backend doesn't have. Reporters connected this to newer models showing as unavailable in the CLI and to Windows updater failures ("standalone Codex updater exited with status exit code: 1").
Disk usage
Commenters report old release copies piling up. One mentions about 12 GB of old versions, and byteiota cites reports of 10 to 20 GB. Neither article measured this itself, so check your own ~/.codex/packages before assuming the worst.
How to disable the Codex CLI daemon
These steps come from the workaround in issue #48195 and match the guides linked above. This isn't documented by OpenAI, so check the result on your own version.
- Turn off auto-start. Run
codex features disable daemon_auto_start. You can also adddaemon_auto_start = falseto~/.codex/config.toml. A Windows 10 user on 0.157.0 reported that the config line alone fixed the problem for them. - Stop the running daemon. Run
codex app-server daemon stop. Changing the config doesn't stop a daemon that's already running. - Kill the updater if it survived. On Linux or macOS, run
pkill -f 'app-server daemon pid-update-loop'. On Windows, look for leftovercodexprocesses in Task Manager or withGet-Process codex*. - Reclaim disk space (optional). Delete
~/.codex/packages/app-server-daemon. Also check~/.codex/packages/standalone/releases, which one commenter says keeps every previous binary. - Verify. Open a new
codexsession, close it, and confirm that noapp-serverprocess remains (ps aux | grep app-server).
For a single session, issue #51763 says that running with --no-daemon keeps the client separate from the shared daemon. A DEV Community post suggests a CODEX_CLI_NO_DAEMON=1 environment variable, but no primary source confirms it, so don't rely on it.
If you want to keep the daemon but stop version drift
Users in issue #49418 report this sequence for syncing the daemon to your installed CLI:
codex app-server daemon stop
codex app-server daemon update --from-cli
codex app-server daemon start
According to commenters, --from-cli pins the daemon to the CLI package. That's what you want if npm or Homebrew is your source of truth, but it also means you're no longer getting the daemon's own production updates.
Should you keep it? A decision guide by setup
The daemon exists for features like Remote Control and the desktop app, where a long-lived backend lets several clients attach to the same session. Whether it helps you depends on how you use Codex.
| Your setup | Recommendation |
|---|---|
| Solo developer, interactive CLI only | Disable it. You lose very little, and you get predictable versions and no stray processes. |
| Using Codex desktop app or Remote Control | Probably keep it, but watch for version mismatches and update before long runs, not during them. |
| CI/CD and headless automation | Disable it and use codex exec. Pin the Codex version in your pipeline. A daemon that updates itself hourly doesn't belong in reproducible builds. |
| Multiple worktrees with different proxies or env vars | Disable it, or run with --no-daemon. Otherwise sessions inherit the first session's environment. |
| Locked-down or managed fleets (Nix, Arch, internal images) | Disable it in the config you ship. Nix packagers have already set it to off by default, according to commits referenced in the issue. |
| Long agent turns (builds, test suites, migrations) | Disable it, or at least make sure no update can land mid-turn. The 60-second SIGKILL budget is shorter than many real tasks. |
For teams, the security question goes beyond convenience. A persistent process that holds agent credentials and downloads and runs new binaries every hour is the kind of thing a security review should have approved first. Add it to your software inventory the same way you would a browser updater or an endpoint agent.
What to do now and what to watch
- Today: Check every machine and runner that has Codex 0.157.0 or later installed. Decide on a policy, and write
daemon_auto_startinto theconfig.tomlyou distribute rather than relying on each developer's choice. - In CI: Add
codex features disable daemon_auto_startas a setup step, pin the CLI version, and usecodex exec. - Watch issue #48195 to see whether OpenAI makes the daemon opt-in for the CLI, adds a first-run prompt, or skips self-updating when a package manager installed Codex. The issue asks for all three.
- Watch issue #40969 for a "defer while turns are running" update policy. A community contributor says they have a working branch, but there's no merged fix yet.
- Read release notes closely. This change shipped as one line in a minor version bump. If AI coding agents are a core part of your workflow, read their changelogs as you would a dependency's. You can compare alternatives in our AI coding assistants directory.
If you're building a developer tool yourself, this episode shows that background services and self-updaters need explicit opt-in, a clean uninstall path, and a changelog entry that names the process, its location on disk and its update schedule. Users will forgive a daemon they agreed to install much more readily than one they find later in ps.
Frequently asked questions
Does Codex CLI run a background process after I close it?
Yes. Since version 0.157.0 (released September 25, 2026), interactive sessions start a managed app-server daemon by default. According to user reports, it keeps running after every Codex window closes, until you stop it or reboot. It comes with a separate updater process that checks for new releases.
How do I disable the Codex CLI daemon?
Run `codex features disable daemon_auto_start` or set `daemon_auto_start = false` in `~/.codex/config.toml`, then run `codex app-server daemon stop`. On some versions the `pid-update-loop` updater survives the stop command, so check `ps` and kill it if it's still there. To get the disk space back, you can then delete `~/.codex/packages/app-server-daemon`.
Why does Codex say 'Server is draining; retry after reconnecting'?
That error appears when the background daemon is replacing itself with a newer version while your session is attached to it. Users have reported it interrupting turns, and in one case the updated daemon became incompatible with the installed CLI. Disabling daemon auto-start, or running with `--no-daemon`, keeps your session out of the shared daemon's lifecycle.
Why doesn't upgrading Codex CLI fix a bug I'm still seeing?
The daemon runs from its own copy of the Codex package, so it can be on a different version than the CLI your package manager installed. Users report `codex --version` showing the new release while the daemon was still on an old one. Stopping the daemon and restarting it, or turning the daemon off, makes sure you're running the code you think you are.
Has OpenAI changed the default to opt-in?
Not as of October 13, 2026. Issue #48195, which asks for the change, is still open, and no maintainer has responded publicly. Version 0.162.1 fixed one related startup failure, but the default itself hasn't changed.
Sources
- openai/codex issue #48195: make daemon_auto_start opt-in— github.com
- Codex rust-v0.157.0 release notes (GitHub)— github.com
- Codex rust-v0.162.1 release notes (GitHub)— github.com
- openai/codex issue #40969: auto-update force-kills active turns— github.com
- openai/codex issue #51763: daemon auto-update drains active session— github.com
- openai/codex issue #49418: update managed app-server when CLI is upgraded— github.com
- Developers Digest: Codex CLI Background Daemon, How to Turn It Off— developersdigest.tech
- byteiota: Codex CLI Background Daemon, What OpenAI Quietly Shipped— byteiota.com
- OpenAI Codex changelog— learn.chatgpt.com
