Desktop, CLI/SSH, and Remote can use competing app servers for the same local tasks
What issue are you seeing?
Desktop, CLI/SSH, and phone Remote access can reach different app-server processes for the same local Codex tasks. In this incident, that produced both a repeated remote-registration conflict and a task-writer conflict. The host was reachable, tasks were visible, and SSH access worked, but I could not send messages to the affected tasks from my phone.
I am opening this report to connect the server-discovery, task-ownership, and lifecycle aspects of the failure. The related issues below describe overlapping symptoms; I am not claiming they all have the same upstream cause.
Environment
- Host: Ubuntu Linux, x86_64.
- Desktop client version recorded in app-server requests:
26.1016.61520. - Desktop-bundled app-server:
0.162.0-alpha.17.2. - Standalone CLI/shared background app-server:
0.163.0. - iOS Remote client version recorded by the host:
1.2026.279. - Workflow: use desktop and CLI/SSH on the workstation, then open the same tasks and send follow-ups from the phone. SSH over Tailscale remained usable during the incident.
Verified observations
1. Two local servers shared one remote identity.
A background app-server listening on a local Unix socket and a separate desktop app-server were running against the same primary Codex home. Their persisted remote enrollments had different client-name keys but the same installation, server, and environment identity. Those identifier values are deliberately omitted here.
The background server repeatedly received:
HTTP error: 409 Conflict
{"detail":"Remote app server already online"}
Its reconnect counter exceeded 1,000, with retries approximately every 20–26 seconds during observation. This was not evidence of 1,000 separate user sessions.
2. Resolving the registration collision alone did not resolve task access.
We first disabled only the background server's remote connection, leaving the desktop app as the remote endpoint. The repeated 409s stopped and the host reported online, but the phone still could not send messages to affected tasks.
The desktop server received actual requests from codex_chatgpt_ios_remote. Its thread/resume attempts failed with:
failed to initialize thread persistence:
thread-store conflict: thread <redacted> already has an active writer
Failed to create session:
thread-store conflict: thread <redacted> already has an active writer
The background server used by CLI/SSH still held writer locks for the affected tasks. This was a live owner, not merely a stale lock. The phone was reaching the host; the problem was which local app-server received its requests.
3. Routing the clients through the existing writer restored access.
We configured the desktop app to connect to the existing shared background server over its local Unix WebSocket, and enabled official Remote access on that shared server. The separate desktop task-server processes exited. The shared server reported Connected, and the desktop handshake reported the same 0.163.0 server version.
After closing and reopening the host on the phone, I confirmed that I could send messages again. Existing task history and the working SSH connection were preserved; we did not delete writer locks to force concurrent writers.
What steps can reproduce the bug?
This is the observed sequence from an existing installation, not yet a minimal reproduction on a clean installation:
- Have a shared background app-server serving local CLI/SSH tasks.
- Open the desktop app so that it uses a separate app-server against the same primary Codex home.
- Enable/use Remote access. In this incident, the servers had persisted enrollments for the same remote identity.
- Open a background-server-owned task from the phone through the desktop server.
- Observe that task metadata can load, but resuming or sending a message is blocked by the existing writer.
- Inspect the host: the remote-registration retry loop and the writer-ownership failure are separate observable problems.
I have not established which original launch or update created the split, or which upstream commit introduced it. The different standalone and bundled runtime versions may be relevant, but this report does not prove version skew is the cause.
What is the expected behavior?
Normal first-party desktop, CLI/SSH, and mobile workflows should discover and reuse the appropriate task server, or coordinate ownership explicitly. Users should not need to understand app-server topology to send a follow-up from another device.
In particular:
- Reuse an existing compatible server that owns the task, or route the request to it.
- If sharing is unavailable, identify the owning client and offer a safe handoff or read-only mode rather than only saying another session is using the task.
- Keep the exclusive writer protection; do not fix this by allowing simultaneous independent writers.
- Coordinate remote registration so two local servers do not endlessly compete under the same identity.
- Make server discovery consistent across desktop reopening, additional CLI sessions, SSH reconnects, and host startup.
Related reports and scope
- https://github.com/openai/codex/issues/40558 — mobile access fails with an active-writer conflict, including Linux corroboration.
- https://github.com/openai/codex/issues/37967 — Remote cannot attach to live CLI sessions; discusses routing through the live CLI server.
- https://github.com/openai/codex/issues/37403 — Desktop cannot resume a Remote/CLI-owned thread.
- https://github.com/openai/codex/issues/24024 — the same 409 text under a different reported trigger, stale reconnect/enrollment state. Shared error text does not establish an identical cause.
- https://github.com/openai/codex/issues/29809 — related server-lifecycle concerns, but that report concerns SSH process accumulation and resource exhaustion; this incident did not establish resource exhaustion.
The additional evidence here is that registration conflicts and live task-writer conflicts coexisted on one host, that removing the registration collision alone was insufficient, and that routing desktop, CLI/SSH, and mobile through the same server restored messaging.
Additional information
The subsequent local startup workaround was tested with desktop reopening, additional explicit and default CLI clients, and a supervisor restart that preserved the live server. Isolated cold-start and crash-recovery tests also passed. An actual machine reboot was not performed, so this is not a claim that post-reboot end-to-end access has been verified or that upstream lifecycle behavior is fixed.
This public report omits machine names and IDs, account/enrollment identifiers, IP and VPN addresses, usernames, task IDs and titles, private filesystem and repository paths, screenshots, and raw logs. The excerpts above are sanitized error text only.
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
- #55924
Powered by Codex Action
I still can't access a session from the phone app while it remains open in my terminal. My installed host CLI reports codex-cli 0.167.0.
This matches the user-visible failure described here and in closed #37967 (my report); I haven't confirmed whether competing app servers are responsible in my setup.
I occasionally see the Windows Codex App report that a task is in use when the same conversation is already open in Codex CLI in a VS Code terminal on Ubuntu WSL2. Opening the conversation in the App first and then opening it in the CLI has sometimes worked for me after restarting. I haven’t isolated whether the restart matters. My installed Windows App is 26.1117.4957.0, and the WSL CLI and managed app-server are both 0.171.0.
My workflow is to talk through GPT‑Live in the Windows App while watching the same conversation in the WSL terminal. Could the CLI join an App-owned conversation as a live read-only view, showing new messages and tool progress while the App handles voice input? If either client needs write access, routing it through the existing owner or offering an explicit handoff would make the order of opening the clients less important.