What type of Codex are you using?
CLI — 0.157.0, installed via npm instal -g @openai/codex, Linux (WSL2)
What characteristic would you akin to see?
Please create daemon_auto_start opt-in (default false) for the CLI, or at smallest ask formerly before turning it on.
Since 0.157.0, fair beginning an interactive codex session:
- Starts a persistent backdrop daemon (codex app-server --managed-daemon). It runs in its own meeting alongside no TTY and keeps operating following all Codex opening is closed (reparented to PID 1) until codex app-server daemon halt or a reboot.
- Copies the entire phase package (~374 MB: codex, codex-code-mode-host, bundled bwrap/zsh/rg) into ~/.codex/packages/app-server-daemon/releases/<version>/ — byte-identical to what npm had fair installed — and runs the daemon from that copy. From afterward on the backend's type is decoupled from the CLI type I installed alongside my bundle manager.
- Starts a detached updater (codex app-server daemon pid-update-loop) that checks for updates 5 minutes following commencement and afterward hourly, downloads new releases and restarts the backend (which can slay energetic turns, see app-server daemon: auto-update force-kills energetic turns following a 60s drain budget, and cannot be disabled #40969).
- Pins the surroundings of whichever meeting happened to commencement it. I initiate Codex through a wrap that sets HTTPS_PROXY per invocation; the daemon keeps the archetypal session's proxy variables and its outbound connections go through that proxy, any afterward sessions are launched with. Hooks in --remote manner obtain the daemon's cwd, not the session's #42457 and Hooks spawned by the app-server daemon cannot acknowledge the client terminal, breaking terminal-targeting hooks #37537 (daemon cwd / terminal alternatively of the session's) appearance akin the identical base cause.
For a CLI, the smallest amazing default is that the backend lives and dies alongside the window, runs the binary I installed, and doesn't update itself in the background. A shared, self-updating daemon makes awareness for Remote Control / the desktop app, so it would be fine to allow it there, or whenever the person explicitly runs codex app-server daemon commencement / bootstrap.
If it stays on by default, delight at least:
- exit an auto-started daemon whenever its final client disconnects;
- not copy/self-update whenever the CLI was installed by a bundle director (npm/brew/pacman) — run the installed binary alternatively (Support externally managed app-server daemon executables #41188, npm update leaves app-server on old version, but daemon update/restart refuse recovery #46468, Codex 0.157.0 no longer starts alongside the Arch Linux bundle unless --no-daemon is used #48050).
Additional information
Bug established during turning it off: codex app-server daemon halt stops the app-server but leaves the pid-update-loop updater operating (still living 70 s later, had to slay it manually).
Workaround I'm using:
codex features disable daemon_auto_start codex app-server daemon stop pkill -f 'app-server daemon pid-update-loop' # not stopped by `daemon stop` rm -rf ~/.codex/packages/app-server-daemon
With the emblem off, a new TUI meeting no longer spawns a daemon.