Repository navigation
Description
Behaviour
On Linux with codex-cli 0.160.0, app-server daemon bootstrap successfully starts the managed app-server and records a daemon-updater PID, but the updater immediately exits when its Unix socket path exceeds the platform address limit. Its stderr contains Error: path must be shorter than SUN_LEN, and daemon-updater.sock never appears. The serving daemon survives, so an immediate PID-file check can incorrectly suggest that auto-update is working.
Observed in a private HOME under a pytest directory on 2026-10-03. No production daemon was stopped or restarted. The fixture's updater socket was longer than Linux's 108-byte Unix-address field. A short private HOME under disk TMPDIR produces a 99-byte updater address and is the proposed fixture workaround.
Source
The updater binds its manual-update listener directly to manual_update_socket_path() in update_loop.rs:118–128.
That path is the updater PID-file path with a .sock extension, with no short-address mapping, in lib.rs:993–995.
The existing deep control-socket path report describes daemon-client control addresses in 0.137/0.139 on macOS. This reproduction concerns the updater's separate socket in 0.160.0 on Linux; the app-server control socket itself works through its existing long-path fallback.
Reproduction
-
Create a private HOME on disk with a long absolute path. Set
CODEX_HOMEto its.codexdirectory. Choose the length so$CODEX_HOME/app-server-daemon/daemon-updater.sockexceeds 108 bytes. -
Copy the installed 0.160.0 app-server release into that private home's
packages/app-server-daemon/releases/0.160.0-x86_64-unknown-linux-musl, createcurrentpointing at that release, and write that release name without a newline toauto-update-version. Never share writable package files or lifecycle state with the real HOME. -
In the private
app-server-daemon/settings.json, enable automatic updates and set shutdown grace to zero. Use a private config and no credentials. -
Run the private binary with HOME, CODEX_HOME and TMPDIR explicitly set to private paths:
"$private_codex" app-server daemon bootstrap -
After bootstrap succeeds, read
app-server-daemon/daemon-updater.pid, inspect that process, the updater socket, anddaemon-updater.stderr.log.
Observed: the updater exits, the socket is absent, and stderr reports SUN_LEN; the daemon accepts a turn. Shortening only the private HOME makes the updater address fit. Stop only the private daemon and updater when finished.
Expected
The updater should use a private short-address mapping for long paths, consistently with app-server control sockets. Bootstrap should not report a working updater merely because its PID record was published before startup failed. A regression should verify the updater stays alive and serves its socket after bootstrap with a long CODEX_HOME.
Environment: codex-cli 0.160.0 (npm, linux-x64 musl), Ubuntu, managed app-server daemon.
Activity