Remote control presence decays on backend while client websocket stays fully connected (device shows stale on phone/web despite healthy local connection)
What version of the Codex App are you using?codex-cli 0.136.0 (latest as of 2026-06-02)
What subscription do you have?
Pro ($100/month)
What platform is your computer?
Linux — Ubuntu 22.04, x86_64 (behind NAT gateway)
---
What issue are you seeing?
After a period of idle (observed: ~40–60 minutes), the machine shows as stale/offline in the Codex phone app and web UI, even though:
- The managed daemon (
codex app-server --remote-control) is running and healthy codex remote-control start --jsonreturns{"status":"connected","timedOut":false}ss -tishows the outbound websocket to the backend with traffic in the last few seconds (live ping/pong, not a dead NAT flow)
Every local signal says the connection is healthy. Only the phone/web UI reveals the actual backend state: the device is offline. The only recovery is restarting the daemon (remote-control stop + start), which forces re-registration and immediately brings the device back online.
This is a backend presence / registration decay issue — not a local connectivity issue. The websocket itself stays alive; something on the backend side stops reporting the device as available.
---
What steps can reproduce the bug?
- Start the managed daemon:
codex remote-control start --json→ confirmsstatus: connected - Confirm the device appears online in the Codex phone/web UI
- Leave the machine idle (no active remote session) for ~40–60 minutes
- Check the phone/web UI → device shows as stale / offline
- Confirm the daemon is still running:
codex remote-control start --json→ still returnsstatus: connected - Confirm the websocket is live:
ss -tion the outbound:443connection shows recentlastsnd/lastrcvtimestamps (seconds, not minutes) - Run
codex remote-control stop && codex remote-control start --json→ device immediately reappears as online in the phone/web UI
The discrepancy between steps 5–6 (client sees connected) and step 4 (backend shows offline) is reproducible consistently after ~40–60 min of idle.
---
What is the expected behavior?
A device whose websocket to the backend is actively exchanging keepalive traffic should remain visible as online in the phone/web UI indefinitely, without requiring periodic daemon restarts.
---
Additional information
Related issues: #24179, #23403, #24194 — this appears to be the same underlying mechanism reported across multiple configurations. The common thread is that remote-control start --json reporting connected is not a reliable indicator of backend-side device presence.
A workaround of periodically restarting the daemon (e.g. every 10 minutes) does keep the device visible, but at the cost of briefly disrupting any connected local sessions — not acceptable as a long-term solution.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗