codex - 💡(How to fix) Fix Codex Desktop remote proxy respawns unmanaged app-server and blocks daemon bootstrap

Official PRs (…)
ON THIS PAGE

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

When a Mac Codex Desktop remote connection is active, it appears to keep a non-interactive SSH session open on the remote host and run codex app-server proxy. During migration to standalone managed daemon mode, killing codex app-server --listen unix:// is ineffective because the proxy immediately respawns an unmanaged app-server.

This causes:

codex app-server daemon bootstrap --remote-control
Error: app server is running but is not managed by codex app-server daemon

Error Message

codex app-server daemon bootstrap --remote-control Error: app server is running but is not managed by codex app-server daemon

Root Cause

When a Mac Codex Desktop remote connection is active, it appears to keep a non-interactive SSH session open on the remote host and run codex app-server proxy. During migration to standalone managed daemon mode, killing codex app-server --listen unix:// is ineffective because the proxy immediately respawns an unmanaged app-server.

Fix Action

Workaround

Terminate the stale SSH notty session that owns the proxy, then run:

codex app-server daemon bootstrap --remote-control

After that, the expected managed processes are:

~/.codex/packages/standalone/current/codex app-server --remote-control --listen unix://
~/.codex/packages/standalone/current/codex app-server daemon pid-update-loop

Code Example

codex app-server daemon bootstrap --remote-control
Error: app server is running but is not managed by codex app-server daemon

---

sshd: user@notty
  `- /bin/sh -c ... codex app-server proxy
      `- codex app-server proxy

codex app-server --listen unix://

---

~/.codex/app-server-control/app-server-control.sock

---

codex app-server daemon bootstrap --remote-control

---

~/.codex/packages/standalone/current/codex app-server --remote-control --listen unix://
~/.codex/packages/standalone/current/codex app-server daemon pid-update-loop

---

Error: app server is running but is not managed by codex app-server daemon
RAW_BUFFERClick to expand / collapse

Summary

When a Mac Codex Desktop remote connection is active, it appears to keep a non-interactive SSH session open on the remote host and run codex app-server proxy. During migration to standalone managed daemon mode, killing codex app-server --listen unix:// is ineffective because the proxy immediately respawns an unmanaged app-server.

This causes:

codex app-server daemon bootstrap --remote-control
Error: app server is running but is not managed by codex app-server daemon

Environment

  • Remote host: Linux over SSH
  • Codex CLI: 0.133.0
  • Client: Mac Codex Desktop remote connection
  • Managed path after successful bootstrap: ~/.codex/packages/standalone/current/codex

Context

I ran into this while trying to make the same remote server available from a phone. The remote server was not showing up as expected from the phone, so I tried to start or repair remote control on the SSH host.

That led to an error around the existing app-server state. I then tried to migrate the host to the standalone managed daemon flow, but even after disabling the old codex-remote-control.service and killing codex app-server --listen unix://, an unmanaged app-server kept coming back and continued to block codex app-server daemon bootstrap --remote-control.

The surprising part was that the respawn source was not the old systemd service. It was a Codex Desktop-created SSH notty session that was still running codex app-server proxy.

Observed process tree

sshd: user@notty
  `- /bin/sh -c ... codex app-server proxy
      `- codex app-server proxy

codex app-server --listen unix://

The unmanaged app-server kept owning:

~/.codex/app-server-control/app-server-control.sock

Killing only codex app-server --listen unix:// caused it to reappear.

Workaround

Terminate the stale SSH notty session that owns the proxy, then run:

codex app-server daemon bootstrap --remote-control

After that, the expected managed processes are:

~/.codex/packages/standalone/current/codex app-server --remote-control --listen unix://
~/.codex/packages/standalone/current/codex app-server daemon pid-update-loop

Expected behavior

One or more of:

  • codex app-server daemon bootstrap --remote-control should report the PID and parent process that is keeping the unmanaged app-server alive.
  • The Desktop remote proxy should detect an existing managed daemon and attach to it instead of respawning an unmanaged app-server.
  • There should be a clear command to disconnect or stop Desktop-created remote proxies on the remote host.
  • The error message should mention that an active codex app-server proxy or SSH notty session may be the respawn source.

Actual behavior

The bootstrap command only reports:

Error: app server is running but is not managed by codex app-server daemon

The unmanaged server may be immediately recreated by the Desktop proxy, making normal kill or disable steps appear ineffective.

Possibly related

  • #23102: SSH bootstrap/proxy flow is fragile and hardcoded.
  • #23317: Desktop-managed SSH remotes are exposed as remote devices.
  • #23572: codex app-server proxy behavior can make connection failures difficult to diagnose.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

One or more of:

  • codex app-server daemon bootstrap --remote-control should report the PID and parent process that is keeping the unmanaged app-server alive.
  • The Desktop remote proxy should detect an existing managed daemon and attach to it instead of respawning an unmanaged app-server.
  • There should be a clear command to disconnect or stop Desktop-created remote proxies on the remote host.
  • The error message should mention that an active codex app-server proxy or SSH notty session may be the respawn source.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

codex - 💡(How to fix) Fix Codex Desktop remote proxy respawns unmanaged app-server and blocks daemon bootstrap