On 25 September OpenAI switched on a setting called daemon_auto_start for everyone, in Codex CLI 0.157.0. Now your first Codex session starts two extra programs, a shared server and an updater, and they stay up until you stop them or restart your computer.
The upside is that a long task keeps going when you close the window: Codex tells you “Any running work continues” and gives you a codex resume command to pick it back up. OpenAI’s command reference also says remote control and SSH remote workflows run through this same server.
Plenty of people would rather it ran only when asked. The request to make it opt-in is issue 48195 on GitHub, and it passed 500 points on Hacker News on 12 October. Here is how to check for it, decide, and switch it off on Mac, Windows and Linux.
Check whether it is running
- Ask Codex itself. Run
codex doctorin a terminal; it reports “background server is running” when the server is up, which is quicker than reading a process list. - On a Mac or Linux, look at the process list. Run
ps ax | grep "[a]pp-server"to list the server and the updater; the server is the line with--managed-daemonand the updater is the line ending inpid-update-loop. Note both, because stopping one does not always stop the other, and leave any other app-server lines alone. - On Windows, ask PowerShell. Run
Get-CimInstance Win32_Process | Where-Object CommandLine -like "*app-server*" | Select-Object ProcessId, CommandLineand note the ProcessId of anypid-update-loopline for step 3 of “Switch it off”. If you run Codex inside WSL, the server lives there too, so open your WSL terminal and use the Mac or Linux commands instead, here and in that step.
Keep it or switch it off
- Keep it if you start long tasks and close the terminal, or you use Codex remote control from another device. Both need the server.
- Switch it off if you want Codex to stop when you close it, or you launch it with different settings each time. People in the issue thread report that the server keeps the environment of whichever session started it, so a proxy or API setting from one launch can leak into later ones.
- Also worth knowing: the server runs its own copy of the program, saved in your Codex folder, so it can drift from the version your package manager installed.
Switch it off, step by step
- Turn the setting off. Run
codex features disable daemon_auto_startso your next session will not start the server. By hand, openconfig.tomlin your.codexfolder (~/.codex/config.tomlon a Mac or Linux,%USERPROFILE%\.codex\config.tomlon Windows) and adddaemon_auto_start = falseunder a[features]line, adding that line first if there is not one. - Stop the server that is already running. Let any long task you left running finish first, because stopping the server ends work still running in it. Then run
codex app-server daemon stop, because the setting only prevents new starts and a server that is already up can still be picked up by your next session. - Check the updater went too. The person who opened the issue found
daemon stopleft the updater running, so run the check above again. On a Mac or Linux, end it withpkill -f "app-server daemon pid-update-loop"; on Windows, useStop-Process -Idfollowed by the ProcessId you noted. - Free up the space, once it is stopped. After steps 2 and 3, nothing uses the server’s copy of Codex (about 374 MB for the issue author). Delete the
app-server-daemonfolder inside.codex, thenpackages, in Finder or File Explorer, or on a Mac or Linux runrm -rf ~/.codex/packages/app-server-daemon. - Check it stayed off. Open Codex, quit it, then run
codex doctoragain; it should no longer report a running background server, which tells you the setting took.
Since version 0.161.0, servers it starts also have analytics on by default; to turn that off, put analytics.enabled = false near the top of config.toml, above any [features] line, or it will not take effect.
If you change your mind, codex features enable daemon_auto_start turns it back on, and codex remote-control start starts the server on purpose whenever you want remote control.
Where OpenAI stands
- The default has not changed. In the latest release, 0.162.1 from 9 October, and in the main code on 13 October, the setting is still on by default.
- No reply on the issue yet. As of 13 October the opt-in request is open with no comment from OpenAI, though recent releases have fixed daemon bugs, such as skipping it on Windows-mounted WSL folders.
- The setting is not in the docs.
daemon_auto_startcomes from Codex’s own code and pull requests; OpenAI’s configuration reference did not list it on 13 October.
The prompt: see what your AI coding tools leave running
Codex is unlikely to be the only tool doing this, and the commands differ on every computer. Paste this into Codex or Claude Code, fill in the top, and it lists every background process, start-up item and setting your AI tools have added, explains each one, and proposes how to switch it off without running anything until you say yes.
You are my careful computer caretaker: a calm systems administrator who has cleaned up a lot of developer laptops and has seen people kill the wrong process, lose a running task, or break a tool by deleting a folder it needed. Your job is to find what my AI coding tools leave running or set to start on this computer, explain each item in plain words, and help me decide what to switch off. Nothing gets stopped, disabled or deleted until I have said yes to that exact item. ABOUT ME AND THIS COMPUTER (I fill this in; any line can say "not sure") - My computer and system: [e.g. "MacBook Air, macOS", "Windows 11 laptop", "Ubuntu on a home server", "Windows with WSL"] - The AI coding tools I have installed, and how I installed them: [e.g. "Codex CLI through npm, Claude Code through its installer, the Codex desktop app", or "not sure, please find them"] - What I use them for, so you know what not to break: [e.g. "I start long Codex tasks and close the terminal", "I use remote control from my phone", "I only run short sessions and quit"] - What I want at the end: [pick one: "just a list, change nothing", "a list plus the commands, I will run them myself", "a list, then stop the items I approve"] - Anything I already know about: [e.g. "Codex starts a background server since version 0.157.0", or "nothing"] BEFORE YOU LOOK 1. If my set-up above is blank or says "not sure" for the system, find it out yourself with a read-only command and tell me what you found. If you cannot run commands here, say so in one line, and give me read-only commands to run and paste back, one per line, labelled with what each one checks. 2. If I did not say what I want at the end, ask me that one question and wait. 3. Say in one line which of my tools you are running inside right now, because that session will show up in the list and must not be stopped. STEP 1: LOOK, READ-ONLY Use only commands that read. Check each of these and keep a note of the command you used: - Running processes whose name or command line belongs to an AI tool (for example codex, claude, cursor, gemini, copilot, ollama, an "app-server", an "updater" or a "daemon"). Include the full command line, because the arguments show what a process is for. - Things set to start on their own. On a Mac: login items and the LaunchAgents folders in my user Library and the main Library. On Linux: user and system services and timers, and crontab. On Windows: startup apps, scheduled tasks and services. - Settings in each tool's own config folder that turn on background running, automatic updates, analytics or remote access. Quote the exact setting name and value as it appears in the file. - Folders those tools keep copies of their own program in, with the size of each. Never open, print or copy files that hold logins, keys or tokens (names like auth, credentials, token, .env, keychain). If a folder holds one, write "contains a login file, not opened". STEP 2: EXPLAIN EACH ITEM For every item, one block: - What it is, in plain words, and which tool it belongs to. - Evidence: the command line, file path or setting that shows this. - What it is probably for. Only say what the tool's own help output, settings file or documentation shows; if you are guessing, write "my guess:" in front; if you cannot tell, write "purpose not stated". - What I would lose if I stopped it (for example a long task that keeps running after I close the window, remote control, automatic updates). - Whether it comes back by itself after a restart or the next time I open the tool, and what decides that. Then sort the items into three groups: SAFE TO LEAVE, WORTH A LOOK, and NOT FROM AN AI TOOL (anything you found that belongs to something else, which you leave alone). STEP 3: WEIGH THE RIGHT WAY TO SWITCH EACH ONE OFF For each item in WORTH A LOOK, propose the gentlest lasting fix first, in this order: - If the tool has its own off switch (a setting, a flag, or a stop command shown in its own help output), use that. Run the tool's help command to confirm the switch exists before you suggest it. - If it is a start-up item, disable it and keep the file, so I can undo it. - Only if neither exists, stop the process by its exact ID. If the only way you know is a setting name you have not seen in the tool's help output, config file or documentation, write "[NEED TO CONFIRM: setting name]" instead of guessing. Never suggest deleting a folder until the thing using it has been stopped, and say how much space it would free. Give each fix as: the command, what it changes, how to undo it, and any task it would interrupt. STEP 4: WAIT FOR MY YES Show me the numbered list of proposed fixes and stop. Do not run anything that changes, stops or deletes until I reply with the numbers I approve. If I approve some and not others, run only those. If a fix would end the session you are running in, warn me and put it last. STEP 5: DO IT AND CHECK IT WORKED Run the approved fixes one at a time. After each one, run the same read-only check from Step 1 to confirm the item is gone or switched off, and tell me if anything restarted itself. If a fix fails, stop there, show me the error, and ask before trying anything else. CHECK YOUR WORK BEFORE YOU FINISH Go back through your list and confirm: every item has evidence you actually saw; every setting name you quoted appears in a file or help output you read; you changed nothing I did not approve; and you did not open any login or key file. Then end with three lines: what is still running on purpose, the one item you are least sure about and why, and the command I can run next week to check nothing has come back.
The honest bit
- The setting is undocumented, so it could change. The commands here come from Codex’s source code, release notes and the GitHub issue, read on 13 October against version 0.162.1. If a future update renames the setting,
codex features listshows what it is called now. - Some of it is user reports. The updater surviving
daemon stop, the 374 MB folder and the leaked environment come from people in the issue thread, and OpenAI has not confirmed them. - Read the prompt’s list before you approve anything, and approve one item at a time the first time.
Do it now, in two minutes
Run codex doctor once. If it reports the background server and you never use long tasks or remote control, run steps 1 to 3 of “Switch it off, step by step” and you are done; if you do use them, leave it on and run the prompt instead, so you at least know what else is running.
A few quick questions
Will a Codex update switch it back on?
It should not. The pull request that added the setting says turning it off saves an explicit false in your config file, and an explicit setting overrides the default. Run codex doctor after big updates to be sure.
Does turning it off break Codex?
Your sessions run the way they did before 0.157.0, inside the terminal window. What you lose is work carrying on after you close the window, and remote control until you start the server with codex remote-control start.