Your AI CLI Just Installed a Daemon
Codex CLI now installs a persistent, self-updating daemon by default. Here's how to audit your machine before it updates itself again.
There's a GitHub issue near the top of Hacker News right now, and it's about your laptop. OpenAI's Codex CLI, the terminal-based coding agent, installs a persistent, self-updating background daemon by default. Not behind a flag. Default.
That means a machine that ran Codex once now has a process that starts at login, survives reboots, and can replace its own binary without asking. If that sentence doesn't bother you, read it again.
Why this matters
Your dev machine is the least defended system you own and the most valuable one an attacker can reach. SSH keys, cloud credentials, tokens in .env files, push access to production repos. We lock down CI and prod, then run unreviewed CLIs with full user permissions on the box holding all the keys.
A self-updating daemon makes it worse in a specific way: the code you audited at install time is not guaranteed to be the code running tomorrow. No pin, no lockfile, no change review. Your whole team's machines now trust the vendor's update pipeline. Compromise that pipeline once and every developer workstation folds at the same moment — the same failure class as the xz backdoor, except through a legitimate auto-update channel.
How it works
"Persistent" on macOS usually means a LaunchAgent: a plist in ~/Library/LaunchAgents that launchd loads at login and keeps alive — kill the process and it comes back. On Linux it's typically a systemd user unit under ~/.config/systemd/user/, enabled so it starts with your session.
"Self-updating" means the daemon fetches a new version of itself, swaps the binary, and restarts. Each step is individually reasonable. Together they produce a process running as you, with your permissions, whose behavior can change after you've stopped paying attention. And none of this requires malice — a buggy update to an agent with filesystem access is a bad day on its own.
Where this helps
- Dev containers: run agent CLIs inside a container or devbox. A daemon can't persist on your host if the tool never runs on your host.
- Team audits: make "list your launch agents" part of laptop onboarding. Thirty seconds, and it catches every vendor daemon — not just this one.
- CI images: check whether your runner images have accumulated background services. On ephemeral machines they're pure risk, zero value.
- Fleet policy: a good excuse to define what "approved auto-update" means before the next tool does the same thing.
Watch out
Don't delete blindly. Removing the daemon may break updates or background features, and the exact behavior is still being argued in the issue — read it before acting. Docker and syncthing ship daemons too, and that's fine; the problem is default-on plus self-updating, not persistence itself. And if you disable auto-update, own the trade-off: you're updating manually now.
Try it yourself
# macOS: list non-Apple background agents
launchctl list | grep -v com.apple
# Find the plist and see what it actually runs
grep -il codex ~/Library/LaunchAgents/*.plist 2>/dev/null | xargs cat
# Linux: user-level services
systemctl --user list-units --type=service
# Then decide: unload the plist, or move the tool into a containerTL;DR
- What changed: Codex CLI installs a persistent, self-updating background daemon by default.
- Why it matters: a self-updating process on every dev machine is uncontrolled supply-chain surface sitting next to all your keys.
- What to try today: run the audit above, then move your agent CLIs into containers.