Repository navigation
Description
What version of Codex CLI is running?
codex-cli 0.160.0 (also reproduced with 0.159.3)
What subscription do you have?
5x
Which model were you using?
gpt-6.1-sol (failure occurs during daemon update, not a model request)
What platform is your computer?
Microsoft Windows NT 10.0.26300.0 x64; native Windows, not WSL
What terminal emulator and version are you using (if applicable)?
Reproduced from PowerShell 7.6.6. Original terminal emulator/version not recorded.
Codex doctor report
codex doctor --json captured on 2026-10-02 AFTER the manual workaround. Summary only; full report omitted to avoid including local paths and unrelated configuration.
CLI: 0.160.0; overallStatus: warning.
installation: ok (installation looks consistent)
runtime.provenance: ok (running npm on windows-x86_64)
config.load: ok
auth.credentials: ok
updates.status: ok (update configuration is locally consistent)
network.provider_reachability: ok
network.websocket_reachability: ok
state.paths: ok
app_server.status: warning (background server socket is stale or unreachable at report capture time)
Other warnings: optional MCP configuration issues, rollout/state DB inventory differences, TERM=dumb in the non-interactive diagnostic run.Immediately after the manual workaround, daemon version/start reported the server running on 0.160.0. The later doctor socket warning is recorded here separately; its relationship to the updater failure is unknown.
What issue are you seeing?
Updating the local Windows background server fails and leaves it on an older version than the installed CLI.
The /daemon update action reports:
Updating the local background server...
Error: standalone Codex updater exited with status exit code: 1
Error: Daemon update failed with status exit code: 1
Running the update directly exposes a more specific error:
codex app-server daemon update --from-cli --yesError: Zugriff verweigert (os error 5)
(English: Access denied.)
Observed version mismatches:
- CLI 0.159.3 / managed daemon 0.157.0 on Oct 1, 2026.
- CLI 0.160.0 / managed daemon 0.159.3 on Oct 2, 2026.
The first mismatch coincided with GPT-6.1 Sol missing from the Windows CLI model picker, although it was available in WSL and the Windows app. Updating the daemon manually restored the model choice (confirmed afterward).
The exact failing filesystem operation and root cause have not been identified.
What steps can reproduce the bug?
Observed on this existing native Windows npm installation (not yet reproduced on a clean installation):
- Have a managed background server installed/running at an older version than the CLI.
- Update the npm-installed CLI; verify with
codex --version. - Try updating the background server via
/daemon. It fails with updater/daemon exit code 1. - Run
codex app-server daemon update --from-cli --yesin PowerShell. It fails withZugriff verweigert (os error 5). - Run
codex app-server daemon version: the CLI is newer, but the managed/running server remains on the old version.
For the 0.157.0 -> 0.159.3 attempt, stopping the server with codex app-server daemon stop before retrying did not resolve the error.
Please note that the second failure happened after the manual junction workaround described below. The first failure predated that workaround.
What is the expected behavior?
The daemon updater should install the selected CLI package and restart the managed server successfully, bringing the CLI and daemon versions into agreement. If an operation fails, the error should identify the affected path/operation so the cause can be diagnosed, rather than exposing only exit code 1 through /daemon.
Additional information
Installation: global npm package @openai/codex on native Windows. CODEX_HOME uses the default %USERPROFILE%.codex.
Checks during investigation:
- The installation directory was writable under the current Windows user.
- The install.lock file could be opened for exclusive read/write access and then closed.
- Copying the same CLI vendor package into the managed daemon releases directory succeeded.
- These checks do not prove that every operation performed by the updater has the required access.
Manual workaround used twice:
- Copy the installed npm CLI's vendor package into
%USERPROFILE%\.codex\packages\app-server-daemon\releases\<version>-x86_64-pc-windows-msvc. - Verify the copied executable's version.
- Stop the managed daemon.
- Rename the existing
currentdirectory junction to a backup junction, preserving the old release. - Create a new
currentjunction targeting the copied release and update theauto-update-versionmarker to the matching release identifier. - Start the daemon and verify the CLI, managed package, and running server versions agree.
This brought the server to 0.159.3 and later 0.160.0. The original releases/backup junctions remain available; this is a workaround, not a fix to the updater.
No clean-install reproduction or confirmed root cause yet. No thread ID included because the failing operation is daemon management, not a model turn.
Activity
github-actions commentedon Oct 2, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
aetherxeg-source commentedon Oct 2, 2026
For the updater, I would make package installation != runtime convergence explicit.
There are several independently meaningful identities here:
requested release -> staged release -> current pointer/junction -> managed package version -> running daemon executable/versionAn update should only report success when the transition reaches a committed generation in which those identities are mutually consistent. If any filesystem operation fails, the previous committed generation should remain authoritative; a partially staged release must not become indistinguishable from the active one.
A useful fault-injection matrix would fail each mutation point (copy, pointer replacement, marker write, restart) and assert either full convergence on the new generation or clean retention of the old generation—never a mixed state. Recording the exact failed operation/path plus before/after generation identities would also make
Access deniedactionable without exposing sensitive content.JohannesGESchmidt commentedon Oct 8, 2026
I encountered the same generic daemon-updater failure on native Windows (npm CLI 0.161.0), and found a PowerShell module-path cause with a working workaround. This does not establish that the
os error 5reported here has the same cause.Diagnosis
My CLI was 0.161.0 while the installed/running daemon was 0.160.0. The regular update failed with
standalone Codex updater exited with status exit code: 1. Updater logs showed successfulinstaller_fetch, followed by failedinstaller_run.Windows Event Viewer revealed the actual error in
Microsoft-Windows-PowerShell/Operational: event 4100 reportedGet-FileHashwas not recognized (CommandNotFoundException). Event 4104 from the same installer process showed it loading:The updater was already launching Windows PowerShell 5.1 (
powershell.exe), notpwsh. Its module search path exposed PowerShell 7 modules to that Windows PowerShell process.I reproduced the lookup failure by putting the PowerShell 7 Modules directory ahead of native Windows PowerShell modules in
PSModulePathinside a Windows PowerShell 5.1 process. With only native Windows PowerShell module paths,Get-FileHashresolved and hashing worked. No matching Defender or AppLocker block events were recorded.Verified workaround
Open a fresh Windows PowerShell 5.1 session directly, rather than running the update from PowerShell 7, then run:
codex app-server daemon updateThis succeeded on my machine, returning
status: updated,installedVersion: 0.161.0, andrunningVersion: 0.161.0. No reinstall was needed.For completeness,
codex app-server daemon update --from-cli --yeshad also succeeded before this, bringing the daemon to 0.161.0 and pinning it, but the regular update still failed until I ran it from Windows PowerShell 5.1.A possible fix would be to ensure the Windows PowerShell installer child receives compatible module search paths. Surfacing the installer exception alongside exit code 1 would also help diagnosis. Future unattended updates from a PowerShell 7 launch environment have not been verified.
etraut-openai commentedon Oct 8, 2026
@JohannesGESchmidt, thanks for posting. We have a fix in place for this issue. It will be included in the 0.162.0 release, which should be published within the next 12 hours.