Repository navigation
Codex App restores stale discovered SSH host state on startup and crashes with "No AppServerManager registered for hostId" #18556
Description
What version of the Codex App are you using (From “About Codex” dialog)?
Version 26.415.40636 (1799)
What subscription do you have?
Pro
What platform is your computer?
Darwin 24.1.0 arm64
What issue are you seeing?
Codex App can get stuck restoring a stale discovered SSH host on startup.
In my case, the old discovered host ID was:
remote-ssh-discovered:192.168.195.80
After startup, the app tried to use that old host/project state even though it was no longer valid. This led to an internal error path and the app showed an error page.
Observed error:
No AppServerManager registered for hostId: remote-ssh-discovered:192.168.195.80
The UI then fell into an "Oops, an error has occurred" state.
What steps can reproduce the bug?
I cannot guarantee a minimal repro from scratch, but this is the state pattern that reproduced it on my machine:
- Use Codex App with Remote SSH / discovered SSH hosts.
- Have one or more remote projects associated with a discovered host ID like
remote-ssh-discovered:<ip>. - Later change/remove that host situation so the old discovered host is no longer valid.
- Restart Codex App.
- On startup, Codex restores previous remote project / host selection state.
- The app attempts to route requests to the stale discovered host ID and fails with
No AppServerManager registered for hostId: ....
What is the expected behavior?
If persisted remote SSH state points to a stale or unavailable discovered host, Codex App should safely ignore or reconcile that state on startup.
It should not crash or show a fatal error page. It should fall back to a neutral state such as no active remote project, no auto-connect for the stale host, or a recoverable prompt asking the user to reselect a host.
Additional information
I investigated local persisted state and found the stale host was being restored from a local global state file rather than only the usual Application Support cache.
The stale references included data shaped like:
agent-mode-by-host-id["remote-ssh-discovered:192.168.195.80"]remote-connection-auto-connect-by-host-id["remote-ssh-discovered:192.168.195.80"] = trueremote-cwds-by-host-and-workspace["remote-ssh-discovered:192.168.195.80"]remote-projects[*].hostId = "remote-ssh-discovered:192.168.195.80"active-remote-project-id
After clearing those stale references, the app started normally and no longer emitted:
remote-ssh-discovered:192.168.195.80No AppServerManager registered for hostId: remote-ssh-discovered:192.168.195.80Oops, an error has occurred
This suggests a startup reconciliation bug in persisted Remote SSH state, rather than an SSH config problem itself.
Suggested fix direction
On startup, if persisted remote host/project state references a discovered host that no longer has a registered app server manager, the app should:
- drop the stale host binding
- clear the active remote project selection for that host
- disable auto-connect for that host
- continue startup without surfacing a fatal error page
Activity
EvenOldridge commentedon May 15, 2026
Related stale Remote SSH state/reconnect issue observed on Codex App
26.513.20950 (2816)on macOS.This is not the exact stale-host/crash case from the issue body, but it looks like the same class of persisted/in-memory Remote SSH state not reconciling after the underlying host becomes healthy again.
Scenario
remote-ssh-discovered:<redacted-ssh-alias>.Observed
The project/connection stayed greyed out with a timeout/error state even though direct SSH worked and the remote Codex binary was available:
Relevant app log lines, with host details redacted:
At this point, the underlying SSH path was healthy, but the Desktop UI appeared to keep serving the stale retry-exhausted connection error. Selecting/opening the remote project was not enough to force a fresh connection object.
Cmd+Rwas unavailable/disabled in this production window.The workaround was to go to Settings > Connections and toggle auto-connect for the SSH host off and back on. That forced reconciliation/recreation of the Remote SSH connection:
Additional detail
There also seems to be a config/state mismatch around retry count.
~/.codex/codex-app/config.jsonhad been set to:{"remoteConnectionMaxRetryAttempts": 20}but the running app logs still showed
remoteConnectionMaxRetryAttempts=2, and the global state keyremote-connection-max-retry-attemptswas observed back at2after the Settings toggle. This suggests the app may be restoring or rewriting stale in-memory/global retry settings independently of the app config, and the retry-exhausted connection can remain stuck until the user toggles auto-connect.Expected
When a Remote SSH connection is in retry-exhausted/error state, Codex Desktop should provide a direct retry/reconnect path from the greyed-out project or status badge. If the underlying SSH host is reachable again, selecting the project or clicking a reconnect control should clear the stale
remote_connection_retry_disabledstate and create a fresh connection attempt.Toggling auto-connect in Settings should not be the only way to recover a healthy remote host after sleep/network loss.