Codex CLI Installs Persistent Self-Updating Background Daemon by Default
OpenAI's Codex CLI version 0.157.0 quietly introduced an auto-starting background daemon that runs decoupled from terminal sessions. The process persists after windows close, copies package binaries into local directories, and can kill active CLI turns during automated updates.

Why it matters
Disable daemon auto-start immediately if you rely on strict environment proxies or predictable CLI process lifecycles.
TL;DR
- 01Codex CLI 0.157.0 runs a persistent background daemon that outlives terminal sessions.
- 02A background updater checks hourly and can terminate active CLI turns after 60 seconds.
- 03Disable auto-start using the CLI feature flag or config.toml to protect local proxy routing.
Key facts
- Release version affected
- 0.157.0
- Extracted package footprint
- ~374 MB
- Auto-update poll interval
- 5 min after start, then hourly
- Force-kill drain budget
- 60 seconds
The Unexpected Background Architecture
Starting in version 0.157.0, invoking the standard Codex CLI on Linux, WSL2, or Windows silently launches codex app-server --managed-daemon. Instead of executing within the invoking terminal's lifecycle, the process is reparented to PID 1 and remains running after all terminal windows are closed. It also duplicates approximately 374 MB of package data—including bundled bwrap, zsh, and rg—into ~/.codex/packages/app-server-daemon/releases/<version>/.
Update Loops and Environment Poisoning
The background server starts an independent updater (codex app-server daemon pid-update-loop) that polls for releases after five minutes and hourly thereafter. When an update arrives, it restarts the backend, giving running turns a 60-second drain budget before terminating them.
Crucially, the daemon freezes the environment of the initial launching shell. If you run multiple sessions with different HTTPS_PROXY values or different working directories, every subsequent invocation routes through the daemon's initial inherited environment.
How to Mitigate and Restore Clean Execution
To prevent the background process from spawning and decouple your sessions, turn off the auto-start feature via the configuration flag or disable it in your configuration:
1. Run codex features disable daemon_auto_start 2. Kill any lingering loop processes: pkill -f 'app-server daemon pid-update-loop' 3. Remove cached daemon binaries: rm -rf ~/.codex/packages/app-server-daemon
Alternatively, specify daemon_auto_start = false in your config.toml to maintain classic local execution.
Try it in 2 minutes
codex features disable daemon_auto_start
pkill -f 'app-server daemon pid-update-loop'
rm -rf ~/.codex/packages/app-server-daemonbash
✓ When to use
- Use local execution when running dynamic VPNs, session-specific HTTPS proxies, or air-gapped terminal workflows.
- Keep the daemon running only if you explicitly leverage Codex Remote Control workflows on dedicated desktop machines.
✕ When NOT to use
- Do not leave default settings active on shared workstations or CI environments where process isolation is required.
- Do not rely on foreground shells to kill background Codex network connections.
What to do today
- Run `codex features disable daemon_auto_start` in your terminal.
- Check running processes with `pgrep -fl app-server` and kill active update loops.
- Add `daemon_auto_start = false` to your ~/.codex/config.toml file.
What the community says
“In some circles this is called a backdoor.”