make `daemon_auto_start` opt-in — a persistent, self-updating background daemon should not be the default · Situation #48195 · openai/codex · GitHub

What variant of Codex are you utilizing?
CLI — 0.157.0, put in through npm set up -g @openai/codex, Linux (WSL2)
What characteristic would you prefer to see?
Please make daemon_auto_start opt-in (default false) for the CLI, or not less than ask as soon as earlier than turning it on.
Since 0.157.0, simply opening an interactive codex session:
- Starts a persistent background daemon (
codex app-server --managed-daemon). It runs in its personal session with no TTY and retains working after each Codex window is closed (reparented to PID 1) tillcodex app-server daemon ceaseor a reboot. - Copies the entire platform bundle (~374 MB:
codex,codex-code-mode-host, bundledbwrap/zsh/rg) into~/.codex/packages/app-server-daemon/releases/— byte-identical to what npm had simply put in — and runs the daemon from that duplicate. From then on the backend’s model is decoupled from the CLI model I put in with my bundle supervisor./ - Starts a indifferent updater (
codex app-server daemon pid-update-loop) that checks for updates 5 minutes after begin after which hourly, downloads new releases and restarts the backend (which might kill energetic turns, see app-server daemon: auto-update force-kills active turns after a 60s drain budget, and cannot be disabled #40969). - Pins the atmosphere of whichever session occurred to start out it. I launch Codex via a wrapper that units
HTTPS_PROXYper invocation; the daemon retains the primary session’s proxy variables and its outbound connections undergo that proxy, no matter later classes are launched with. Hooks in –remote mode receive the daemon’s cwd, not the session’s #42457 and Hooks spawned by the app-server daemon cannot identify the client terminal, breaking terminal-targeting hooks #37537 (daemon cwd / terminal as a substitute of the session’s) appear to be the identical root trigger.
For a CLI, the least stunning default is that the backend lives and dies with the window, runs the binary I put in, and does not replace itself within the background. A shared, self-updating daemon is sensible for Remote Control / the desktop app, so it will be high-quality to allow it there, or when the person explicitly runs codex app-server daemon begin / bootstrap.
If it stays on by default, please not less than:
Additional info
Bug discovered whereas turning it off: codex app-server daemon cease stops the app-server however leaves the pid-update-loop updater working (nonetheless alive 70 s later, needed to kill it manually).
Workaround I’m utilizing:
codex options disable daemon_auto_start
codex app-server daemon cease
pkill -f 'app-server daemon pid-update-loop' # not stopped by `daemon cease`
rm -rf ~/.codex/packages/app-server-daemon
With the flag off, a brand new TUI session now not spawns a daemon.
