Persistent app-server and pid-update-loop disappear without restart, leaving stale daemon state on Linux
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Active
- Tech stack
- linux, rust
- Domain
- cli, devops, operating-systems
Research direction
Start with the codex app-server daemon and pid-update-loop entry points, then inspect the codex doctor daemon-state checks and the reported stale socket and PID files. Reproduction is not deterministic; done should include reliable supervision or recovery when either managed process exits, with stale state detected and termination or restart failures persisted.
Written by the indexing model from the issue text.
Description
What version of the Codex App are you using (From “About Codex” dialog)?
Remote Linux host is running standalone Codex CLI/app-server 0.145.0
What subscription do you have?
Pro
What platform is your computer?
Linux 6.12.63+deb13-amd64 x86_64 unknown
What issue are you seeing?
Summary
A persistent remote-control app-server on a Linux host stopped unexpectedly and was not restarted. Both the app-server and its managed pid-update-loop were absent afterward, leaving a stale control socket and
updater PID file. The host consequently became inaccessible from the ChatGPT mobile app.
This may be related to #23954, which reports managed-daemon PID instability and unexpected app-server replacement. This case differs because both managed processes disappeared and persistent mode did not recover
either one.
Environment
- Remote host OS: Debian 13 (trixie)
- Kernel:
Linux 6.12.63+deb13-amd64 x86_64 - Codex CLI/app-server:
0.145.0 - Install method: standalone
- Authentication: ChatGPT
- Daemon mode: persistent
- Remote Control: enabled
- Remote client: ChatGPT mobile app
The daemon settings file still contained:
{
"remoteControlEnabled": true
}
Actual behavior
Remote Control had been working from my phone. Later, the Linux host appeared offline and could no longer be accessed remotely.
codex doctor reported:
⚠ app-server background server socket is stale or unreachable
daemon state dir ~/.codex/app-server-daemon
settings ~/.codex/app-server-daemon/settings.json (file)
pid file ~/.codex/app-server-daemon/app-server.pid (missing)
update-loop pid file ~/.codex/app-server-daemon/app-server-updater.pid (file)
control socket ~/.codex/app-server-control/app-server-control.sock
status stale or unreachable
app-server version unavailable (failed to connect to control socket)
mode persistent
Running the daemon version check produced:
$ codex app-server daemon version
Error: failed to connect to /home/<redacted>/.codex/app-server-control/app-server-control.sock
No codex app-server or codex app-server daemon pid-update-loop process remained.
The stale updater PID file contained a PID that no longer existed:
{
"pid": 2167423,
"processStartTime": "Fri Jul 24 15:35:29 2026"
}
The app-server stderr log ended abruptly at approximately 2026-07-24 20:55 PDT. It did not contain a panic, fatal application error, graceful shutdown, exit status, or terminating signal.
Host investigation
I checked the host for an external termination cause:
$ sudo journalctl --since "2026-07-24 20:45" \
--until "2026-07-24 21:10" |
grep -Ei 'oom|out of memory|killed process|codex|2167423|session|scope'
# No output
I also queried journald for the stale updater PID:
$ sudo journalctl _PID=2167423 --no-pager
-- No entries --
Additional findings:
- The host did not reboot.
- There was no logged OOM-killer event.
- There was no relevant systemd or session shutdown event.
- There was no core dump.
- No Codex update was installed at the failure time.
- Codex state and log database integrity checks passed.
- The final stderr entries were recoverable tool or model-cache errors, not a panic.
Because neither Codex nor journald retained a termination record, the original exit trigger cannot be determined retrospectively.
What steps can reproduce the bug?
Reproduction
I do not yet have a deterministic trigger:
- Install standalone Codex on a Linux host.
- Enable Remote Control and persistent daemon mode.
- Confirm the host is accessible from ChatGPT mobile.
- Leave the app-server running during normal Codex activity.
- Eventually, the mobile host becomes unavailable.
- Observe that both managed processes are absent while the socket and updater PID file remain stale.
I can provide a redacted codex doctor --json report and the daemon stderr log if needed.
What is the expected behavior?
Expected behavior
When persistent mode and Remote Control are enabled:
- The managed updater loop should remain alive.
- If app-server exits, it should be restarted automatically.
- If the updater loop also exits, another supervision mechanism should recover it.
- Exit status, terminating signal, and restart failures should be persisted.
- Stale sockets and PID files should be detected and repaired automatically.
The host should not remain offline indefinitely with stale daemon state.
Additional information
No response
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.5k
- Avg merge
- 1m
- Merged PRs (30d)
- 1k
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from openai/codex
-
enhancement remote
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
bug CLI windows-os
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
macOS sandbox blocks hw.optional.arm64 sysctl, causing Flutter to misdetect Apple Silicon as x64 Openbug CLI sandbox
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug CLI TUI
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
CLI config enhancement skills
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
kwakseongjae/auto-hwp#319 ·
-
area:cli bug filter-quality good first issue priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
bevyengine/bevy#25861 ·
-
comp-datalake
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ClickHouse/ClickHouse#121222 ·
-
A-linter
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
oxc-project/oxc#26863 ·