2026-11-26 15:47 UTC

OpenAI's Codex CLI 0.157+ installs a persistent, self-updating background daemon by default — copying 374MB of binaries to ~/.codex, pinning the launching session's environment, and running an hourly updater that can kill active turns — and GitHub issue #48195 demands this be made opt-in; whether OpenAI changes the default, adds auto-shutdown on client disconnect, or respects package-manager installations resolves whether Codex CLI's default behavior is a recognized security and privacy concern for developer machines.

state: corroboratedheat: lowuncertainty: mediumcodex-cli agent-security supply-chain agent-infrastructureOpenAIYihua-Liu-1997

Current assessment

A user reported that Codex CLI 0.157.0, installed through npm on WSL2, starts a persistent managed app-server daemon and updater by default, with substantial files copied under ~/.codex; another user reported daemon auto-start on Windows and said setting daemon_auto_start=false resolved their issue. These are user reports, not an independent audit or OpenAI acknowledgment, and the GitHub issue requesting opt-in behavior remains the linked primary evidence; no fix or policy change is shown. A separate HN story about another agent destroying system components caused the latest velocity spike but is not evidence about Codex CLI. The case is currently quiet. Affected installations, package-manager behavior, practical security or privacy impact, and whether OpenAI will change the default remain unresolved.

Measured heat

now 0 pts/hpeak 0 pts/hcomments 0/hpeers p10momentum: steady3 platformsage 1513h
points/hour across evidence · reading as of 2026-11-27 02:23:58.509736+11:00 · deterministic, not a model opinion

How the heat travelled

09-24 14:00⭐ origin echo-reconstructedIssue titled "CLI: make `daemon_auto_start` opt-in — a persistent, self-updating background daemon shouldn't be the default." The reporter w
Yihua-Liu-1997 (GitHub user; issue filed in openai/codex) on github (echo) · attributed from hn.story.50060694
—
10-12 18:29first on hacker news · published · +436.5hCodex CLI installs a persistent, self-updating background daemon by default
whimblepop
—
10-22 13:37first on r/codex · published · +671.6hAuto-update cannot be switched off (Mac)
daskalou
—
10-12 18:29amplified on hacker news 👑hn.story.50060694
whimblepop
peak 610 · 288 comments · 92% of case engagement
10-22 13:37amplified on r/codexreddit.post.1xcit3u
daskalou
peak 1 · 2 comments · 0% of case engagement
11-04 10:43amplified on hacker newshn.story.50363717
jstanley
peak 43 · 32 comments · 8% of case engagement
10-12 19:20our radar first saw it · +437.4hdiscovery anchor: hn.story.50060694—

Evidence (4) — ⭐ canonical anchor

sourceobjectauthorscorecomments
🟧 hnCodex CLI installs a persistent, self-updating background daemon by default
Retrieved article excerpt

Open article · Retrieved 2026-10-12T19:26:28.114020+00:00

## Repository navigation



# CLI: make `daemon_auto_start` opt-in — a persistent, self-updating background daemon shouldn't be the default #48195

New issue

Copy link

New issue

Copy link

Open

Open

[CLI: make `daemon_auto_start` opt-in — a persistent, self-updating background daemon shouldn't be the default](https://github.com/openai/codex/issues/48195#top)#48195

Copy link

Labels

[CLIIssues related to the Codex CLI](https://github.com/openai/codex/issues?q=state%3Aopen%20label%3A%22CLI%22)Issues related to the Codex CLI[app-serverIssues involving app server protocol or interfaces](https://github.com/openai/codex/issues?q=state%3Aopen%20label%3A%22app-server%22)Issues involving app server protocol or interfaces[enhancementNew feature or request](https://github.com/openai/codex/issues?q=state%3Aopen%20label%3A%22enhancement%22)New feature or request

## Description

[@Yihua-Liu-1997](https://github.com/Yihua-Liu-1997)

[Yihua-Liu-1997](https://github.com/Yihua-Liu-1997)

opened [on Sep 25, 2026](https://github.com/openai/codex/issues/48195#issue-5587858931)

Issue body actions

### What variant of Codex are you using?

CLI — 0.157.0, installed via `npm install -g @openai/codex`, Linux (WSL2)

### What feature would you like to see?

Please make `daemon_auto_start` **opt-in (default `false`) for the CLI**, or at least ask once before turning it on.

Since 0.157.0, just opening an interactive `codex` session:

1. **Starts a persistent background daemon** (`codex app-server --managed-daemon`). It runs in its own session with no TTY and keeps running after every Codex window is closed (reparented to PID 1) until `codex app-server daemon stop` or a reboot.
2. **Copies the whole platform 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 just installed — and runs the daemon from that copy. From then on the backend's version is decoupled from the CLI version I installed with my package manager.
3. **Starts a detached updater** (`codex app-server daemon pid-update-loop`) that checks for updates 5 minutes after start and then hourly, downloads new releases and restarts the backend (which can kill active turns, see [app-server daemon: auto-update force-kills active turns after a 60s drain budget, and cannot be disabled #40969](https://github.com/openai/codex/issues/40969)).
4. **Pins the environment of whichever session happened to start it.** I launch Codex through a wrapper that sets `HTTPS_PROXY` per invocation; the daemon keeps the first session's proxy variables and its outbound connections go through that proxy, whatever later sessions are launched with. [Hooks in --remote mode receive the daemon's cwd, not the session's #42457](https://github.com/openai/codex/issues/42457) and [Hooks spawned by the app-server daemon cannot identify the client terminal, breaking terminal-targeting hooks #37537](https://github.com/openai/codex/issues/37537) (daemon cwd / terminal instead of the session's) look like the same root cause.

For a CLI, the least surprising default is that the backend lives and dies with the window, runs the binary I installed, and doesn't update itself in the background. A shared, self-updating daemon makes sense for Remote Control / the desktop app, so it would be fine to enable it there, or when the user explicitly runs `codex app-server daemon start` / `bootstrap`.

If it stays on by default, please at least:

- exit an auto-started daemon when its last client disconnects;
- not copy/self-update when the CLI was installed by a package manager (npm/brew/pacman) — run the installed binary instead ([Support externally managed app-server daemon executables #41188](https://github.com/openai/codex/issues/41188), [npm update leaves app-server on old version, but daemon update/restart refuse recovery #46468](https://github.com/openai/codex/issues/46468), [Codex 0.157.0 no longer starts with the Arch Linux package unless --no-daemon is used #48050](https://github.com/openai/codex/issues/48050)).

### Additional information

**Bug found while turning it off:** `codex app-server daemon stop` stops the app-server but leaves the `pid-update-loop` updater running (still alive 70 s later, had to kill 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 flag off, a new TUI session no longer spawns a daemon.

Related: [#40969](https://github.com/openai/codex/issues/40969), [#41188](https://github.com/openai/codex/issues/41188), [#46468](https://github.com/openai/codex/issues/46468), [#48050](https://github.com/openai/codex/issues/48050), [#42457](https://github.com/openai/codex/issues/42457), [#37537](https://github.com/openai/codex/issues/37537)

Reactions are currently unavailable

## Activity

1. [github-actions](https://github.com/apps/github-actions)

   added

   [enhancementNew feature or request](https://github.com/openai/codex/issues?q=state%3Aopen%20label%3A%22enhancement%22)New feature or request

   [CLIIssues related to the Codex CLI](https://github.com/openai/codex/issues?q=state%3Aopen%20label%3A%22CLI%22)Issues related to the Codex CLI

   [app-serverIssues involving app server protocol or interfaces](https://github.com/openai/codex/issues?q=state%3Aopen%20label%3A%22app-server%22)Issues involving app server protocol or interfaces

   [on Sep 25, 2026](https://github.com/openai/codex/issues/48195#event-31862185006)
2. ### megahall commented on Sep 25, 2026

   [@megahall](https://github.com/megahall)

   [megahall](https://github.com/megahall)

   [on Sep 25, 2026](https://github.com/openai/codex/issues/48195#issuecomment-5839297868)

   More actions

   [@Yihua-Liu-1997](https://github.com/Yihua-Liu-1997) thanks for reporting this, I hit it myself... stuff should not be creating mystery servers and processes all of a sudden on small version number bumps without giving people a heads-up...

   👍React with 👍6Reacted by tagor, Flaviu Tamas, Felipe Lopes, Josh Triplett, BigBoyDevBox and Kamil Mielnik
3. ### kr8vka0z commented on Sep 25, 2026

   [@kr8vka0z](https://github.com/kr8vka0z)

   [kr8vka0z](https://github.com/kr8vka0z)

   [on Sep 25, 2026](https://github.com/openai/codex/issues/48195#issuecomment-5840246332)

   More actions

   agreed. the CLI is unusable until this is fixed.

   👍React with 👍7Reacted by tagor, Steven Dale, Felipe Lopes, krrr, Shaun Pedicini, Christian Hahn and BigBoyDevBox
4. ### tagorr commented on Sep 25, 2026

   [@tagorr](https://github.com/tagorr)

   [tagorr](https://github.com/tagorr)

   [on Sep 25, 2026](https://github.com/openai/codex/issues/48195#issuecomment-5841071558)

   More actions

   I can confirm this on Windows 10 LTSC with Codex CLI 0.157.0  
   Setting `daemon_auto_start = false` in `config.toml` resolves the issue

   Two improvements would help:

   1. Automatically fall back to local mode when daemon startup is blocked by elevation, instead of requiring `--no-daemon`.
   2. Make daemon auto-start opt-in rather than the default.

   This would preserve the security restrictions without disrupting the normal CLI workflow.

   👍React with 👍1Reacted by BigBoyDevBox
5. ### Yihua-Liu-1997 commented on Sep 26, 2026

   [@Yihua-Liu-1997](https://github.com/Yihua-Liu-1997)

   [Yihua-Liu-1997](https://github.com/Yihua-Liu-1997)

   [on Sep 26, 2026](https://github.com/openai/codex/issues/48195#issuecomment-5841872851)

   Author

   More actions

   [@tagorr](https://github.com/tagorr) Indeed — both 1 and 2 would work~

   ❤️React with ❤️1Reacted by tagor
6. [breakds](https://github.com/breakds)

   added a commit that references this issue [on Sep 28, 2026](https://github.com/openai/codex/issues/48195#event-32019696289)

   [codex: disable daemon auto-start by default](https://github.com/nixvital/ml-pkgs/commit/b51c03677d8ebffb11058772b514766fca71c699)

   ...

   [b51c036](https://github.com/nixvital/ml-pkgs/commit/b51c03677d8ebffb11058772b514766fca71c699)
7. ### felipeelopes commented on Sep 29, 2026

   [@felipeelopes](https://github.com/felipeelopes)

   [felipeelopes](https://github.com/felipeelopes)

   [on Sep 29, 2026](https://github.com/openai/codex/issues/48195#issuecomment-5899366619)

   More actions

   The Codex CLI is unusable due to this bug on Windows.
8. ### zdd commented on Sep 30, 2026

   [@zdd](https://github.com/zdd)

   [zdd](https://github.com/zdd)

   [on Sep 30, 2026](https://github.com/openai/codex/issues/48195#issuecomment-5902442558)

   More actions

   This is terrible. I can't input anything on the CLI at all. You should fix this problem as soon as possible and give us 100 banked reset!
9. ### aetherxeg-source commented on Oct 3, 2026

   [@aetherxeg-source](https://github.com/aetherxeg-source)

   [aetherxeg-source](https://github.com/aetherxeg-source)

   [on Oct 3, 2026](https://github.com/openai/codex/issues/48195#issuecomment-5968781597) – with [ChatGPT Codex Connector](https://www.chatgpt.com)

   More actions

   There is a useful provenance boundary behind this request:

   `installed CLI identity != daemon execution identity`

   Once the CLI copies itself into a managed release directory and a background updater can replace that copy, the process that services a later turn is no longer necessarily the artifact the user explicitly installed or invoked.

   I would make the daemon expose a small execution receipt for each client attachment containing at least:

   `client_cli_version + daemon_binary_digest + daemon_generation + updater_state + inherited_environment_generation`

   Then a client can distinguish:

   - same installed artifact, same daemon generation;
   - same CLI but different daemon generation;
   - daemon binary changed independently of the package-manager state;
   - daemon inherited environment from an earlier session.

   A strong regression would start the daemon under environment A, attach from environment B, update the installed CLI, and verify that the client can see exactly which daemon generation/binary/environment is authoritative for the turn rather than inferring it from the foreground CLI version.

   Related runtime behavioral-integrity work: <https://github.com/AETHERXGLOBAL/execsurface>
10. [difro](https://github.com/difro)

    added a commit that references this issue [on Oct 7, 2026](https://github.com/openai/codex/issues/48195#event-32671918595)

    [Update codex to 0.160.1 with a sandbox patch for nix-user-chroot](https://github.com/difro/dotfiles/commit/cff8b11055e7b3b6dedcb6666190779fc0da6ac8)

    ...

    [cff8b11](https://github.com/difro/dotfiles/commit/cff8b11055e7b3b6dedcb6666190779fc0da6ac8)
11. [danielscoffee](https://github.com/danielscoffee)

    added a commit that references this issue [on Oct 10, 2026](https://github.com/openai/codex/issues/48195#event-32917151043)

    [feat(codex): package Codex CLI from official release binaries](https://github.com/danielscoffee/nixos/commit/4f00eb3e90a70badab07912f27d790430b49dab7)

    ...

    [4f00eb3](https://github.com/danielscoffee/nixos/commit/4f00eb3e90a70badab07912f27d790430b49dab7)
12. [xizhou0606](https://github.com/xizhou0606)

    added a commit that references this issue [on Oct 12, 2026](https://github.com/openai/codex/issues/48195#event-33074699653)

    [Add Oct 12 tech news (incremental scan window 18:00-19:00 UTC Oct 12 …](https://github.com/xizhou0606/ai-interview-experience/commit/0c9fad3e21c896677f43a555fed21424a24f268b)

    ...

    [0c9fad3](https://github.com/xizhou0606/ai-interview-experience/commit/0c9fad3e21c896677f43a555fed21424a24f268b)
13. ### laurynas-karvelis commented on Oct 12, 2026

    [@laurynas-karvelis](https://github.com/laurynas-karvelis)

    [laurynas-karvelis](https://github.com/laurynas-karvelis)

    [on Oct 12, 2026]
whimblepop610287
🟧 echo.github ⭐Issue titled "CLI: make `daemon_auto_start` opt-in — a persistent, self-updating background daemon shouldn't be the default." The reporter wYihua-Liu-1997 (GitHub user; issue filed in openai/codex)——
🟠 redditAuto-update cannot be switched off (Mac)
codex
daskalou12
🟧 hnTold to reboot a server, it destroyed systemd, destroyed containers, ran randomjstanley4332

Interpretation history

Decision trace