Codex CLI Runs Silently in the Background | How to Stop It and What to Know About Auto-Updates
機械翻訳 / Machine-translated

機械翻訳 / Machine-translated
@aifriends
AI Friends(https://aifriends.jp)のクロスポスト公式アカウント。AIツールの紹介・使い方・できることを、中学生でもわかるやさしい日本語で届けます。
Imagine closing a terminal, only to find an AI program still running in the background. Unsettling, right? That is exactly what is being reported with OpenAI's coding tool "Codex CLI." This article explains what is happening and how to stop it.
In a recent version of Codex CLI (an AI coding assistant that runs in the terminal), a background resident program has been enabled by default.
This resident program is called a "daemon" — a program that keeps running behind the scenes, invisible on screen.
The story was covered by GIGAZINE on October 15, 2026, and has sparked debate among developers.
It started with a proposal filed on GitHub requesting that the feature be off by default, with users able to opt in if they want it.
The change affects version 0.157.0 and later, released on September 25, 2026.
According to a blog post by Daniel Vaughan, the previous version 0.156.0 offered this feature as an opt-in option. With 0.157.0, it became the default behavior.
The setting is named daemon_auto_start. When an interactive session is opened and certain conditions are met, a background server starts automatically.
The user who filed GitHub issue #48195 reports the following.
An approximately 374 MB platform package is saved under ~/.codex in the home folder.
From that copy, a process called codex app-server --managed-daemon runs. It does not stop when the terminal is closed.
On top of that, a separate process runs to check for updates — once five minutes after launch, then every hour. If a newer version is found, it is downloaded and the background server is restarted.
In other words, separate from the CLI itself installed via npm or similar, a second copy of Codex keeps updating itself. This can cause the two copies to fall out of sync with each other.
First, the restart triggered by an update can interrupt an ongoing conversation or task.
Related issue #40969 (August 26, 2026) reports that when an update runs on a remote host, the program sends a termination signal, waits 60 seconds, and forcibly kills the process if it has not stopped by then.
Second, environment variables become frozen. For example, a proxy configured in one day's session can carry over into the next day's session.
Third, a bug has been reported where the update-check process keeps running even after daemon stop is called.
Imagine this: you switch your company VPN, but Codex alone keeps trying to connect via the old proxy and fails. It can take a long time to realize the background process is the culprit.
The issue reportedly gathered 292 comments and 599 points on Hacker News (an overseas IT news forum).
Complaints were prominent in the comments.
On the other hand, some commenters pointed out that "Claude Code also leaves old versions and background processes behind," suggesting this is not a problem unique to Codex.
No official statement from OpenAI could be confirmed at the time of writing. Maintainer responses were also absent from the issue thread.
There are also reports that daemon_auto_start does not appear in the official settings reference, and that the 0.157.0 release notes mentioned it only briefly in a single sentence.
According to GIGAZINE, a change to make the daemon not auto-start by default was found in the commit log, suggesting a fix may be in progress — though no confirmed public release of that fix has been found.
No official way to disable it has been found. However, multiple reports confirm it can be stopped via a configuration flag.
The simplest approach is to add the following two lines to ~/.codex/config.toml:
[features]
daemon_auto_start = false
The steps described by the issue author use commands to address things one by one:
codex features disable daemon_auto_start
codex app-server daemon stop
pkill -f 'app-server daemon pid-update-loop'
rm -rf ~/.codex/packages/app-server-daemon
The first line disables the feature, the second stops the running daemon, the third terminates any lingering update-check process, and the fourth removes the saved package.
These steps are also introduced by DevelopersDigest, though the author notes they have not reproduced the issue themselves.
Two caveats: the setting name is written differently depending on the source. Vaughan's article shows a different form, so check which applies to your version.
Also, rm -rf is dangerous if you target the wrong path. Always double-check the path before running it.
After stopping it, start Codex fresh and run ps to confirm. If no app-server process appears, you are done.
AI coding tools generally handle updates in one of three ways:
A developer commented on Hacker News that they chose the "check on launch" approach rather than a daemon, partly because persistent background processes tend to be flagged by antivirus software.
The daemon approach does have advantages. According to Vaughan's article, it makes startup faster, allows work to continue even after the terminal is closed, and lets multiple tabs share the same server.
In other words, the concern is that the convenience comes at the cost of something running out of the user's sight.
This is particularly problematic for users who prefer fixed versions — such as those using nix or Homebrew with pinned packages — since the self-updating daemon bypasses those constraints.
This is not someone else's problem for developers in Japan. Here are three scenarios where it can bite.
First, engineers working on corporate networks. Anyone who switches proxy settings from day to day is more likely to encounter the bug where old settings persist.
Second, IT departments. If an unapproved program runs as a resident process and makes outbound connections every hour, it may require explanation during an audit.
Third, freelancers working on company PCs. On a laptop with limited disk space, the 374 MB footprint combined with accumulating old versions can quietly eat up free space.
The fix is straightforward. For teams sharing Codex, adding daemon_auto_start = false to your distributed config file or internal documentation provides peace of mind.
It appears to be an intentional standard feature added by OpenAI. The 0.157.0 release notes reportedly include a sentence mentioning the auto-start background server. That said, the lack of clear explanation has drawn strong criticism, with some calling it "malware-like."
It affects interactive sessions on version 0.157.0 and later. Running a one-off command with codex exec is reported not to be affected.
Reports indicate that stopping it simply prevents new sessions from launching the background server. The issue author notes that with this setting in place, new terminal windows no longer spawn the daemon.
No official announcement has been confirmed at this time. Issue #48195 remains open as of writing. Check the GitHub release notes for updates.
Start by running ps in your terminal to check whether app-server is lingering in your environment.
This article is a cross-post from AI Friends.