You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Windows Desktop does not auto-connect an enabled SSH host after restart #59931
Codex Desktop for Windows: 26.1103.3517.0 on the inspected PC.
Remote Codex CLI: 0.167.0.
Reproduced by the user on two Windows devices using the same SSH host.
The laptop's exact application version has not been independently recorded.
Reproduction
Enable the existing SSH connection and confirm remote conversations load.
Restart Codex Desktop without changing the connection settings.
Wait at least 30 seconds without manually toggling Connect.
Expected: the previously enabled SSH host reconnects automatically.
Actual: the connection stays disconnected; remote conversations do not load.
Manually enabling the existing Connect checkbox restores access.
Evidence
On the inspected PC, the saved auto-connect preference for that host is true.
Startup logs report one discovered connection but zero auto-connect connections.
Following the manual toggle, the auto-connect count becomes one and the host
connects successfully. Direct SSH and reading the remote conversation work.
No authentication failure was found in this observed startup.
This suggests a startup auto-connect/preference reconciliation problem, but
does not establish the exact release that introduced it. No keys, conversation
databases or application state have been modified as a workaround.
Is this a known Windows regression, and is there a supported way to restore
automatic reconnection without recreating connections or editing local state?
Reacted by Hans Fredrik Unelsrød, Yifang Yan, Arnold Stark, Caitlyn, HUNGRY_M0, Plain, Benyomin Mandel and Shivam Tawari
This restart/auto-connect symptom also occurs on macOS, with the same manual Connect workaround.
Verified environment:
ChatGPT desktop 26.1103.32239, build 25471.
macOS 26.7.2, Apple Silicon / arm64.
After quitting and reopening the desktop app, existing remote SSH connections remain disconnected. Manually unchecking and rechecking the existing Connect checkbox in Settings > Connections restores remote SSH access. This started after a recent update, but the exact first affected release is unverified.
A read-only inspection of existing local logs found:
Startup reconciliation reports autoConnectConnectionCount=0 despite discovering SSH hosts. Saved remote projects are still present in the current persisted state. Later in the same launch log, an SSH app-server connection starts and the host reaches connected.
The behavior and workaround were observed during normal use; the investigation inspected existing logs and state without editing SSH keys or persisted app state. These findings support investigating startup restoration/auto-connect across platforms, without assuming an identical root cause.
The same-version macOS report is #60047. Hostnames, addresses, usernames, local paths, and conversation identifiers are omitted.
Confirming the same startup auto-connect symptom on another Windows installation, with a newer desktop package version.
Environment:
ChatGPT desktop / Codex Windows package: 26.1103.4239.0.
Three saved SSH connections: two remote hosts and one local WSL Ubuntu SSH connection.
Observed November 7, 2026, Asia/Shanghai (UTC+8).
After restarting the desktop app, all three SSH connections appear switched off and disconnected. A read-only inspection of the current persisted state confirms that remote-connection-auto-connect-by-host-id contains true for all three saved host IDs.
The same launch log shows the following discrepancy:
2026-11-07T07:25:06.733Z info [remote-connections/window-context] refresh_completed autoConnectConnectionCount=0 codexManagedConnectionCount=2 discoveredConnectionCount=1 nextConnectionCount=3 previousConnectionCount=0
Later in that same session, after revisiting the SSH settings, a connection-list refresh reads all three saved preferences as enabled:
2026-11-07T09:13:38.943Z info [remote-connections/window-context] refresh_completed autoConnectConnectionCount=3 codexManagedConnectionCount=2 discoveredConnectionCount=1 nextConnectionCount=3 previousConnectionCount=3
The subsequent log entries show app-server connection attempts starting. These timestamps correspond to approximately 15:25 and 17:13 local time (UTC+8).
This supports the distinction between a preference being lost on disk and a saved enabled preference not being applied to the startup connection catalog. An account-state restoration / SSH catalog initialization-order issue is a hypothesis, not a confirmed root cause. The exact first affected release has not been established.
No SSH keys, connection definitions, or persisted application state were modified as a workaround during this investigation. Hostnames, addresses, usernames, local paths, and host identifiers are omitted.
I’m seeing the same issue on Windows with app package 26.1103.4239.0.
The saved Auto-Connect preference remains true, but after fully quitting and reopening the app, the SSH host stays disconnected. The startup log shows:
remote_project_connection_restore_skipped reason=no_remote_projects
refresh_completed autoConnectConnectionCount=0 discoveredConnectionCount=1
Manually enabling Connect changes autoConnectConnectionCount to 1, and the host connects successfully. The problem returns on the next app restart. Direct SSH login also works.
Read-only inspection of the bundled desktop code suggests an initialization-order issue: account-scoped preferences are temporarily unavailable when the initial SSH catalog is built. The preferences are restored after account initialization, but the SSH catalog appears to retain its initial disabled state.
Additional Windows reproduction, observed November 8, 2026 America/Chicago (UTC timestamps below are November 9). The user explicitly authorized publication of this sanitized evidence.
Read-only inspection found:
The saved remote-connection-auto-connect-by-host-id preference is true for the affected host.
That host is selected and saved remote-projects state is nonempty.
Two recent app launches recorded remote_project_connection_restore_skipped reason=no_remote_projects.
Both launches discovered one connection but initially counted zero auto-connect connections.
After the user revisits Connections, autoConnectConnectionCount=1
02:40:18.081
Connection reaches connected, approximately 1.3 seconds after startup begins
For each successful connection, the app's remote login-shell path probe, version probe and app-server bootstrap returned exit 0. The user observes that merely revisiting the connection/menu restores it; an explicit checkbox change was not required in the latest observation.
The local app-server logs report 0.167.0-alpha.3.2; the remote CLI reports 0.154.0. The exact Windows desktop application package version/build and OS build have not been independently verified, so no first-affected-version claim is made.
These results support a startup restoration/catalog reconciliation discrepancy rather than a lost saved preference. They do not establish the internal root cause or that another report has an identical cause. No SSH keys, host trust, connection definitions, persisted application state, server settings or services were changed as part of this inspection. Hostnames, addresses, usernames, private paths, account/conversation identifiers and raw logs are omitted.
Is there a supported fix or distributed Windows build that restores the saved auto-connect preference at startup without recreating connections or editing private state?
Additional reproduction on Windows desktop package 26.1103.7773.0, observed 2026-11-10. This adds a verified package version and a recovery path that does not require toggling the Connect checkbox.
Environment:
Two saved SSH connections: one remote Linux machine and one SSH alias into local WSL2 Ubuntu.
Both saved remote-connection-auto-connect-by-host-id entries are true.
Native WSL connection entries are present but have auto-connect disabled.
Noninteractive SSH authentication succeeds for both hosts; the Ubuntu SSH service is enabled and active.
Reproduction:
Enable both SSH connections and confirm they work.
Quit and restart the desktop app.
Saved preferences remain enabled, but the startup SSH catalog reports zero auto-connect connections and both remain disconnected.
Open Settings > Connections > SSH and leave the page open without changing either checkbox.
A subsequent automatic refresh reads both enabled preferences and both connections succeed.
Sanitized log evidence from the same launch (UTC):
The remote Linux host reached connected at 01:15:36.443Z; the WSL SSH host reached connected at 01:15:56.324Z. Neither checkbox was toggled during this recovery. Earlier launches on November 9 and 10 showed the same initial zero count.
Read-only inspection of the installed desktop bundle suggests the following hypothesis: account-scoped preferences are temporarily removed from the active state during initialization, the SSH catalog is built while those preferences are unavailable, and restoring the account state does not trigger the necessary SSH catalog reconciliation. The SSH settings page contains a 15-second refresh interval, consistent with the observed recovery. This is an inferred explanation, not a maintainer-confirmed root cause.
The user suspects a regression related to recent native WSL integration, but causation and the first affected version are unverified. The macOS reproduction already in this issue also warrants investigating the shared account-state/catalog startup path.
Expected: once the authenticated account state is restored, re-read the persisted SSH auto-connect preferences and reconcile connections automatically, without requiring the user to open Settings on every restart.
No SSH keys, host trust, server configuration, saved connection definitions, or account-scoped application state were changed. A temporary shortcut to the SSH settings page was tested and removed at the user's request. Private addresses, host aliases/IDs, account identifiers, usernames, paths, conversation contents and full raw logs are omitted.
Additional Windows confirmation on 2026-11-10, with an isolated check of the account-state restoration hypothesis discussed above.
Environment:
Windows desktop package: 26.1103.4239.0.
Version in the installed desktop package.json: 26.1103.32239.
Local app-server: 0.167.0-alpha.3.2; remote Linux app-server: 0.165.0.
One saved Codex-managed SSH connection and three saved remote projects.
The saved remote-connection-auto-connect-by-host-id value for the affected host is true. Startup nevertheless leaves the connection disconnected. Enabling it manually in Settings > Connections > SSH restores access.
Selected log fields from the same launch (UTC; identifiers and unrelated fields omitted):
Read-only inspection of this installed bundle found that the global-state constructor calls selectRendererOwner(null). The account-scoped global-key set includes both the SSH auto-connect preference and remote-projects. While these values are temporarily outside the active owner state, the SSH catalog's auto-connect lookup defaults to false.
An offline check executed the installed owner-selection method against an in-memory copy of the saved state, with persistence/notifications disabled and an identity stub for the owner hash. For the relevant global keys, the observed transitions were:
Phase
Auto-connect key present
Effective SSH auto-connect
Remote projects
Saved state
yes
true
3
After selecting null owner at startup
no
false (default)
0
After restoring the same owner
yes
true
3
This matches the startup log's temporary no_remote_projects and zero auto-connect count. The observed launch did not refresh the SSH catalog again until the manual recovery. This supports an initialization/reconciliation defect; it is not an end-to-end restart reproduction under a debugger or a maintainer-confirmed root cause.
Historical logs on this installation show successful automatic selection on November 4-5 and on one November 6 launch, followed by zero auto-connect counts on later November 6 launches and on November 8-10. Both successful and unsuccessful November 6 launches used package 26.1103.3517.0, so the exact introducing build or trigger remains unverified.
Expected: after authenticated account state is restored, re-read the saved SSH auto-connect preferences and reconcile the SSH catalog automatically.
The inspection did not modify the installed application, SSH configuration, saved account state, or remote host. Private hostnames/IPs, usernames, paths, account identifiers, keys, and conversation contents are omitted.
Confirming the same symptom after an update and restart on Windows.
Codex Desktop: 26.1103.60933, build 25894, production channel.
On 2026-11-10, the app restarted after an update. The saved SSH connections remained disconnected and remote projects did not appear in the project list.
Read-only inspection immediately after startup showed three saved SSH connections and five saved remote project records. The persisted auto-connect preference was true for two hosts and false for the third.
The three hosts were subsequently reported as disconnected during the startup state fetch. The saved projects and enabled preferences were inspected after startup; the no_remote_projects line does not prove what data was available at that exact earlier instant.
The same zero-autoconnect startup symptom was observed on this installation on November 7. On November 6, manually reconnecting existing SSH hosts brought the saved remote projects back. The exact cause and the first affected version remain unconfirmed. No hostnames, addresses, credentials, project paths, or conversation data are included.
Could the team investigate startup restoration and explain whether there is a supported fix for preserving SSH auto-connect across app restarts and updates?
Additional Windows reproduction on November 10, 2026, including an unsuccessful cold-start deep-link workaround.
Environment
Desktop app: 26.1103.60933, build 25894, production channel, as returned by the desktop app update checker.
Windows package: 26.1103.7773.0 (a separate package version).
Local app-server: 0.167.0-alpha.3.2; remote CLI: 0.161.0.
The configured update checker returned up_to_date today. This establishes only that this installation currently has no eligible update.
Reproduction and observations
Enable an existing SSH connection and successfully use it.
Fully quit/relaunch the desktop app without changing SSH settings.
The host remains disconnected. The saved remote-connection-auto-connect-by-host-id value for it is still true.
Direct non-interactive SSH succeeds, and the remote login shell can find the Codex executable.
Multiple launch logs show one discovered SSH connection but zero auto-connect connections, together with remote_project_connection_restore_skipped reason=no_remote_projects. Saved remote-project records are present when inspected after startup.
Selected event summaries from this installation (UTC, November 10):
Later connection-list refresh: autoConnectConnectionCount=1
09:12:23.603
SSH app-server reaches connected
09:17:48.267
Next startup: discoveredConnectionCount=1, autoConnectConnectionCount=0
09:18:39.953
After opening SSH settings in the running app: autoConnectConnectionCount=1
09:18:47.017
SSH app-server reaches connected
09:28:58.976
Another startup: discoveredConnectionCount=1, autoConnectConnectionCount=0
Workaround limitation
Opening codex://settings/connections/ssh in an already-running app was followed by successful refresh/reconnection. However, using that same supported URI as a launch shortcut did not reliably work from a fully exited app: the user reported that the first double-click did not launch successfully, the second launched the app, and SSH still did not auto-connect. The exact cause of the first launch failure was not established. The temporary shortcut has been removed; this is not a validated cold-start workaround.
Read-only inspection of the installed bundle is consistent with the account-restoration/catalog-initialization hypothesis already discussed here: SSH auto-connect and remote-project keys are account-scoped, while the initial SSH catalog can be built before those values are restored. This is a supported hypothesis from static inspection and logs, not a maintainer-confirmed root cause or a debugger-verified execution trace.
Expected: after authenticated account state is restored, re-read saved SSH auto-connect preferences and reconcile the connections automatically, without requiring Settings navigation after every restart.
The report contains sanitized event summaries only. No raw logs, credentials, addresses, host aliases/IDs, account identifiers, private paths, or conversation contents are attached. No application bundle, SSH configuration, or saved account state was edited.
Additional macOS confirmation on 26.1103.60933 (build 25894), plus one successful restart using the app's built-in startup configuration.
Environment: macOS 27.2.1, Apple Silicon / arm64. Observed November 10, 2026.
Before the workaround, the existing SSH host had auto-connect saved as true, and four saved remote projects were present when inspected after startup. Opening the app previously connected this host automatically; the connection had not been manually disabled. In the affected launch, the remote host remained disconnected.
Inspection of this installed version shows that it reads $CODEX_HOME/codex-app/config.json during startup. Applying that configuration refreshes the SSH catalog and requests connections for the listed aliases.
That file did not exist on this installation. The only configuration change was to create ~/.codex/codex-app/config.json with the existing SSH alias:
The remote host connected during startup, and all four existing remote projects were subsequently available through the desktop app's project listing.
This is one verified restart on this version, not a claim of a supported permanent fix or compatibility with future releases. The initial zero-auto-connect state still occurs; the startup configuration supplies a subsequent refresh. No application-bundle patch was required.
Could the normal startup path refresh/reconcile saved SSH auto-connect preferences after account state restoration, so users do not need this additional configuration? The exact first affected build remains unverified.
Host aliases/IDs, addresses, usernames, private paths, account identifiers, conversation contents, and credentials are omitted.
Additional Linux evidence matching the startup auto-connect discrepancy, observed on November 10, 2026.
Environment and reproduction
Inspected machine: CachyOS, x86_64.
Installed desktop logs identify platform=Linux and release=26.1103.60933. This is the desktop release, not the separately installed CLI version.
The user also reports the same startup behavior on a second Arch-based Linux installation (Omarchy).
After opening/restarting Desktop, existing SSH connections appear switched off/disconnected. The user manually enables them to regain access. They previously reconnected automatically; the exact first affected version is unknown.
CachyOS: startup catalog versus later refresh
These are selected original event lines from one desktop launch, with no host/account/conversation identifiers:
2026-11-10T16:37:30.903Z info [remote-connections/window-context] remote_project_connection_restore_skipped reason=no_remote_projects
2026-11-10T16:37:30.997Z info [remote-connections/window-context] refresh_completed autoConnectConnectionCount=0 codexManagedConnectionCount=0 discoveredConnectionCount=7 nextConnectionCount=7 previousConnectionCount=0
2026-11-10T16:38:13.549Z info [remote-connections/window-context] refresh_completed autoConnectConnectionCount=7 codexManagedConnectionCount=0 discoveredConnectionCount=7 nextConnectionCount=7 previousConnectionCount=7
2026-11-10T16:38:24.310Z info [remote-connections/window-context] refresh_completed autoConnectConnectionCount=7 codexManagedConnectionCount=0 discoveredConnectionCount=7 nextConnectionCount=7 previousConnectionCount=7
The catalog initially counts zero auto-connect connections despite discovering seven hosts, then counts seven approximately 42.6 seconds later, following interaction with the connections UI.
A later read-only inspection of ~/.codex/.codex-global-state.json found:
remote-connection-auto-connect-by-host-id: six entries, all true.
codex-managed-remote-connections: six saved records.
remote-projects: 17 entries.
These are later persisted-state counts, not an atomic snapshot taken at 16:37:30. The same launch log subsequently records the auto-connect count dropping to six and the discovered count dropping to six. We therefore do not infer that exactly seven saved flags were present at the instant of startup. The directly observed startup discrepancy is the initial zero count versus the later seven count in the same launch.
On Omarchy, the current persisted state contains eight managed SSH records and eight enabled auto-connect preferences. We have not established an equivalent timestamped startup count transition for that second installation.
No relevant top-level SSH/remote-connection override was found in either installation's system or user config.toml. The enabled preferences persist in Desktop state; this does not look like all saved flags simply being overwritten as false.
Interpretation and scope
The Linux startup sequence is consistent with the saved-preference/catalog reconciliation problem reported here on Windows and macOS. Account-state restoration/initialization ordering remains a hypothesis, not a confirmed internal root cause.
We have not tested the codex-app/config.json workaround described in the preceding macOS comment on these Linux installations. No Desktop bundle or persisted connection preferences were modified during this diagnosis.
Hostnames, addresses, usernames, account/host/conversation identifiers, credentials, and complete logs/screenshots are deliberately omitted.
Could the normal startup path reconcile the SSH catalog after saved account preferences become available, without requiring manual Settings interaction?
Additional Windows evidence from package 26.1103.7773.0, inspected November 12, 2026. This independently reproduces the account-state mechanism described in the earlier analysis and identifies the missing reconciliation point in this installed bundle.
Observed launch behavior
The saved state contains an existing SSH connection with auto-connect true, a selected remote host, and one remote project. The SSH proxy works. Sanitized event summaries from the November 12 launch (UTC):
Later catalog refresh reports autoConnectConnectionCount=1
23:23:14.971
Remote app-server connection starts
23:23:19.534
Connection reaches connected, with no connection error
The November 11 launch repeats the initial zero count and later successful connection. No remote connection attempt is recorded during initial startup in the inspected November 12 log.
Confirmed packaged-code mechanism and its limits
Read-only inspection of app.asar found:
The global-state constructor loads saved state synchronously and then calls selectRendererOwner(null).
The account-scoped key list includes remote-connection-auto-connect-by-host-id, remote-projects, and selected-remote-host-id. Selecting the null owner moves those keys out of active state into the inactive account bucket.
The initial refreshRemoteConnections() reads the temporarily absent auto-connect map; getAutoConnectForRemoteConnection() defaults SSH auto-connect to false.
refreshAccountWindows() later calls finishRendererAccountSwitch(), restoring account state. That completion path does not itself refresh the SSH catalog.
Executing the exact installed owner-selection method against synthetic in-memory state, with an identity stub and no disk persistence, produced:
Phase
Effective auto-connect map
Remote projects
Synthetic saved owner
enabled for test host
1
Select null owner
empty
0
Restore same owner
enabled for test host
1
This confirms the state-hiding/restoration mechanism and matches the launch evidence. It is not a full-app debugger reproduction, a tested application patch, or a maintainer-confirmed diagnosis of every report in this issue.
Proposed durable fix
After successful account-state restoration, refresh/reconcile the SSH catalog from that account's restored preferences (or subscribe to account readiness and coalesce the refresh). Do not interpret pending account state as a persisted disabled preference.
Please preserve existing host IDs, SSH configuration, credentials, project associations, and healthy connections. Make the refresh idempotent, avoid duplicate connection attempts, honor disabled auto-connect and intentional disconnects, and prevent stale account-switch results from applying.
Suggested regression coverage:
Cold launch with saved enabled SSH host and delayed account identification automatically connects after restoration.
Saved disabled host stays disconnected.
Repeated readiness notifications do not duplicate/restart a healthy connection.
Account switches use only the restored account's preferences.
The later report of success on 26.1106.51428 / CLI 0.167.2 is encouraging; we have not installed or verified that update. Please confirm whether it includes this reconciliation fix.
No installed app patch, saved-settings edit, SSH/remote-host change, or restart was performed during this diagnosis. Host aliases/addresses, usernames, account/conversation IDs, credentials, and full logs are omitted. An undated server-side socket-conflict entry was excluded because it cannot be correlated with these launches.
Activity
solzard commentedon Nov 7, 2026
This restart/auto-connect symptom also occurs on macOS, with the same manual Connect workaround.
Verified environment:
After quitting and reopening the desktop app, existing remote SSH connections remain disconnected. Manually unchecking and rechecking the existing Connect checkbox in Settings > Connections restores remote SSH access. This started after a recent update, but the exact first affected release is unverified.
A read-only inspection of existing local logs found:
Startup reconciliation reports
autoConnectConnectionCount=0despite discovering SSH hosts. Saved remote projects are still present in the current persisted state. Later in the same launch log, an SSH app-server connection starts and the host reachesconnected.The behavior and workaround were observed during normal use; the investigation inspected existing logs and state without editing SSH keys or persisted app state. These findings support investigating startup restoration/auto-connect across platforms, without assuming an identical root cause.
The same-version macOS report is #60047. Hostnames, addresses, usernames, local paths, and conversation identifiers are omitted.
HandleCoding commentedon Nov 7, 2026
Confirming the same startup auto-connect symptom on another Windows installation, with a newer desktop package version.
Environment:
26.1103.4239.0.After restarting the desktop app, all three SSH connections appear switched off and disconnected. A read-only inspection of the current persisted state confirms that
remote-connection-auto-connect-by-host-idcontainstruefor all three saved host IDs.The same launch log shows the following discrepancy:
Later in that same session, after revisiting the SSH settings, a connection-list refresh reads all three saved preferences as enabled:
The subsequent log entries show app-server connection attempts starting. These timestamps correspond to approximately 15:25 and 17:13 local time (UTC+8).
This supports the distinction between a preference being lost on disk and a saved enabled preference not being applied to the startup connection catalog. An account-state restoration / SSH catalog initialization-order issue is a hypothesis, not a confirmed root cause. The exact first affected release has not been established.
No SSH keys, connection definitions, or persisted application state were modified as a workaround during this investigation. Hostnames, addresses, usernames, local paths, and host identifiers are omitted.
jiangkaiqi2005 commentedon Nov 8, 2026
I’m seeing the same issue on Windows with app package 26.1103.4239.0.
The saved Auto-Connect preference remains true, but after fully quitting and reopening the app, the SSH host stays disconnected. The startup log shows:
remote_project_connection_restore_skipped reason=no_remote_projects
refresh_completed autoConnectConnectionCount=0 discoveredConnectionCount=1
Manually enabling Connect changes autoConnectConnectionCount to 1, and the host connects successfully. The problem returns on the next app restart. Direct SSH login also works.
Read-only inspection of the bundled desktop code suggests an initialization-order issue: account-scoped preferences are temporarily unavailable when the initial SSH catalog is built. The preferences are restored after account initialization, but the SSH catalog appears to retain its initial disabled state.
321Fontsize commentedon Nov 8, 2026
same issue
j44miller commentedon Nov 9, 2026
Additional Windows reproduction, observed November 8, 2026 America/Chicago (UTC timestamps below are November 9). The user explicitly authorized publication of this sanitized evidence.
Read-only inspection found:
remote-connection-auto-connect-by-host-idpreference istruefor the affected host.remote-projectsstate is nonempty.remote_project_connection_restore_skipped reason=no_remote_projects.Selected event summaries (not raw logs):
For each successful connection, the app's remote login-shell path probe, version probe and app-server bootstrap returned exit 0. The user observes that merely revisiting the connection/menu restores it; an explicit checkbox change was not required in the latest observation.
The local app-server logs report 0.167.0-alpha.3.2; the remote CLI reports 0.154.0. The exact Windows desktop application package version/build and OS build have not been independently verified, so no first-affected-version claim is made.
These results support a startup restoration/catalog reconciliation discrepancy rather than a lost saved preference. They do not establish the internal root cause or that another report has an identical cause. No SSH keys, host trust, connection definitions, persisted application state, server settings or services were changed as part of this inspection. Hostnames, addresses, usernames, private paths, account/conversation identifiers and raw logs are omitted.
Is there a supported fix or distributed Windows build that restores the saved auto-connect preference at startup without recreating connections or editing private state?
younglinuxer commentedon Nov 10, 2026
Additional reproduction on Windows desktop package 26.1103.7773.0, observed 2026-11-10. This adds a verified package version and a recovery path that does not require toggling the Connect checkbox.
Environment:
remote-connection-auto-connect-by-host-identries aretrue.Reproduction:
Sanitized log evidence from the same launch (UTC):
The remote Linux host reached connected at 01:15:36.443Z; the WSL SSH host reached connected at 01:15:56.324Z. Neither checkbox was toggled during this recovery. Earlier launches on November 9 and 10 showed the same initial zero count.
Read-only inspection of the installed desktop bundle suggests the following hypothesis: account-scoped preferences are temporarily removed from the active state during initialization, the SSH catalog is built while those preferences are unavailable, and restoring the account state does not trigger the necessary SSH catalog reconciliation. The SSH settings page contains a 15-second refresh interval, consistent with the observed recovery. This is an inferred explanation, not a maintainer-confirmed root cause.
The user suspects a regression related to recent native WSL integration, but causation and the first affected version are unverified. The macOS reproduction already in this issue also warrants investigating the shared account-state/catalog startup path.
Expected: once the authenticated account state is restored, re-read the persisted SSH auto-connect preferences and reconcile connections automatically, without requiring the user to open Settings on every restart.
No SSH keys, host trust, server configuration, saved connection definitions, or account-scoped application state were changed. A temporary shortcut to the SSH settings page was tested and removed at the user's request. Private addresses, host aliases/IDs, account identifiers, usernames, paths, conversation contents and full raw logs are omitted.
redqiezi commentedon Nov 10, 2026
Additional Windows confirmation on 2026-11-10, with an isolated check of the account-state restoration hypothesis discussed above.
Environment:
26.1103.4239.0.26.1103.32239.0.167.0-alpha.3.2; remote Linux app-server:0.165.0.The saved
remote-connection-auto-connect-by-host-idvalue for the affected host istrue. Startup nevertheless leaves the connection disconnected. Enabling it manually in Settings > Connections > SSH restores access.Selected log fields from the same launch (UTC; identifiers and unrelated fields omitted):
Read-only inspection of this installed bundle found that the global-state constructor calls
selectRendererOwner(null). The account-scoped global-key set includes both the SSH auto-connect preference andremote-projects. While these values are temporarily outside the active owner state, the SSH catalog's auto-connect lookup defaults to false.An offline check executed the installed owner-selection method against an in-memory copy of the saved state, with persistence/notifications disabled and an identity stub for the owner hash. For the relevant global keys, the observed transitions were:
This matches the startup log's temporary
no_remote_projectsand zero auto-connect count. The observed launch did not refresh the SSH catalog again until the manual recovery. This supports an initialization/reconciliation defect; it is not an end-to-end restart reproduction under a debugger or a maintainer-confirmed root cause.Historical logs on this installation show successful automatic selection on November 4-5 and on one November 6 launch, followed by zero auto-connect counts on later November 6 launches and on November 8-10. Both successful and unsuccessful November 6 launches used package
26.1103.3517.0, so the exact introducing build or trigger remains unverified.Expected: after authenticated account state is restored, re-read the saved SSH auto-connect preferences and reconcile the SSH catalog automatically.
The inspection did not modify the installed application, SSH configuration, saved account state, or remote host. Private hostnames/IPs, usernames, paths, account identifiers, keys, and conversation contents are omitted.
zedkam commentedon Nov 10, 2026
Confirming the same symptom after an update and restart on Windows.
26.1103.60933, build25894, production channel.truefor two hosts andfalsefor the third.Sanitized startup log, UTC:
The three hosts were subsequently reported as disconnected during the startup state fetch. The saved projects and enabled preferences were inspected after startup; the
no_remote_projectsline does not prove what data was available at that exact earlier instant.The same zero-autoconnect startup symptom was observed on this installation on November 7. On November 6, manually reconnecting existing SSH hosts brought the saved remote projects back. The exact cause and the first affected version remain unconfirmed. No hostnames, addresses, credentials, project paths, or conversation data are included.
Could the team investigate startup restoration and explain whether there is a supported fix for preserving SSH auto-connect across app restarts and updates?
isoloist commentedon Nov 10, 2026
Additional Windows reproduction on November 10, 2026, including an unsuccessful cold-start deep-link workaround.
Environment
26.1103.60933, build25894, production channel, as returned by the desktop app update checker.26.1103.7773.0(a separate package version).0.167.0-alpha.3.2; remote CLI:0.161.0.up_to_datetoday. This establishes only that this installation currently has no eligible update.Reproduction and observations
remote-connection-auto-connect-by-host-idvalue for it is stilltrue.Multiple launch logs show one discovered SSH connection but zero auto-connect connections, together with
remote_project_connection_restore_skipped reason=no_remote_projects. Saved remote-project records are present when inspected after startup.Selected event summaries from this installation (UTC, November 10):
Workaround limitation
Opening
codex://settings/connections/sshin an already-running app was followed by successful refresh/reconnection. However, using that same supported URI as a launch shortcut did not reliably work from a fully exited app: the user reported that the first double-click did not launch successfully, the second launched the app, and SSH still did not auto-connect. The exact cause of the first launch failure was not established. The temporary shortcut has been removed; this is not a validated cold-start workaround.Read-only inspection of the installed bundle is consistent with the account-restoration/catalog-initialization hypothesis already discussed here: SSH auto-connect and remote-project keys are account-scoped, while the initial SSH catalog can be built before those values are restored. This is a supported hypothesis from static inspection and logs, not a maintainer-confirmed root cause or a debugger-verified execution trace.
Expected: after authenticated account state is restored, re-read saved SSH auto-connect preferences and reconcile the connections automatically, without requiring Settings navigation after every restart.
The report contains sanitized event summaries only. No raw logs, credentials, addresses, host aliases/IDs, account identifiers, private paths, or conversation contents are attached. No application bundle, SSH configuration, or saved account state was edited.
Junqi-Zhang commentedon Nov 10, 2026
Additional macOS confirmation on 26.1103.60933 (build 25894), plus one successful restart using the app's built-in startup configuration.
Environment: macOS 27.2.1, Apple Silicon / arm64. Observed November 10, 2026.
Before the workaround, the existing SSH host had auto-connect saved as
true, and four saved remote projects were present when inspected after startup. Opening the app previously connected this host automatically; the connection had not been manually disabled. In the affected launch, the remote host remained disconnected.Selected startup events (UTC; private identifiers omitted):
Locally verified configuration workaround
Inspection of this installed version shows that it reads
$CODEX_HOME/codex-app/config.jsonduring startup. Applying that configuration refreshes the SSH catalog and requests connections for the listed aliases.That file did not exist on this installation. The only configuration change was to create
~/.codex/codex-app/config.jsonwith the existing SSH alias:{ "version": 1, "remoteConnections": [ { "sshAlias": "<existing-ssh-alias>", "projects": [] } ] }The empty
projectslist preserved the existing saved projects; it did not clear them.After restarting the app, the new launch log showed:
The remote host connected during startup, and all four existing remote projects were subsequently available through the desktop app's project listing.
This is one verified restart on this version, not a claim of a supported permanent fix or compatibility with future releases. The initial zero-auto-connect state still occurs; the startup configuration supplies a subsequent refresh. No application-bundle patch was required.
Could the normal startup path refresh/reconcile saved SSH auto-connect preferences after account state restoration, so users do not need this additional configuration? The exact first affected build remains unverified.
Host aliases/IDs, addresses, usernames, private paths, account identifiers, conversation contents, and credentials are omitted.
exisz commentedon Nov 10, 2026
it's happening to me on windows. SSH doesn't stay "ON" after restarting and must be manually turned on, very annoying.
jibanez-staticduo commentedon Nov 10, 2026
Additional Linux evidence matching the startup auto-connect discrepancy, observed on November 10, 2026.
Environment and reproduction
platform=Linuxandrelease=26.1103.60933. This is the desktop release, not the separately installed CLI version.CachyOS: startup catalog versus later refresh
These are selected original event lines from one desktop launch, with no host/account/conversation identifiers:
The catalog initially counts zero auto-connect connections despite discovering seven hosts, then counts seven approximately 42.6 seconds later, following interaction with the connections UI.
A later read-only inspection of
~/.codex/.codex-global-state.jsonfound:remote-connection-auto-connect-by-host-id: six entries, alltrue.codex-managed-remote-connections: six saved records.remote-projects: 17 entries.These are later persisted-state counts, not an atomic snapshot taken at 16:37:30. The same launch log subsequently records the auto-connect count dropping to six and the discovered count dropping to six. We therefore do not infer that exactly seven saved flags were present at the instant of startup. The directly observed startup discrepancy is the initial zero count versus the later seven count in the same launch.
On Omarchy, the current persisted state contains eight managed SSH records and eight enabled auto-connect preferences. We have not established an equivalent timestamped startup count transition for that second installation.
No relevant top-level SSH/remote-connection override was found in either installation's system or user
config.toml. The enabled preferences persist in Desktop state; this does not look like all saved flags simply being overwritten as false.Interpretation and scope
The Linux startup sequence is consistent with the saved-preference/catalog reconciliation problem reported here on Windows and macOS. Account-state restoration/initialization ordering remains a hypothesis, not a confirmed internal root cause.
We have not tested the
codex-app/config.jsonworkaround described in the preceding macOS comment on these Linux installations. No Desktop bundle or persisted connection preferences were modified during this diagnosis.Hostnames, addresses, usernames, account/host/conversation identifiers, credentials, and complete logs/screenshots are deliberately omitted.
Could the normal startup path reconcile the SSH catalog after saved account preferences become available, without requiring manual Settings interaction?
hungryM0 commentedon Nov 12, 2026
I have updated the desktop application to the latest version
26.1106.51428, and updatedcodex-clito version0.167.2.Now the issue no longer occurs on my machine.
agent-sovereign commentedon Nov 13, 2026
Additional Windows evidence from package 26.1103.7773.0, inspected November 12, 2026. This independently reproduces the account-state mechanism described in the earlier analysis and identifies the missing reconciliation point in this installed bundle.
Observed launch behavior
The saved state contains an existing SSH connection with auto-connect
true, a selected remote host, and one remote project. The SSH proxy works. Sanitized event summaries from the November 12 launch (UTC):remote_project_connection_restore_skipped reason=no_remote_projectsload_completed savedRemoteConnectionCount=1 totalConnectionCount=1refresh_completed autoConnectConnectionCount=0 discoveredConnectionCount=1persistedSelectedRemoteHostId=nullautoConnectConnectionCount=1connected, with no connection errorThe November 11 launch repeats the initial zero count and later successful connection. No remote connection attempt is recorded during initial startup in the inspected November 12 log.
Confirmed packaged-code mechanism and its limits
Read-only inspection of
app.asarfound:selectRendererOwner(null).remote-connection-auto-connect-by-host-id,remote-projects, andselected-remote-host-id. Selecting the null owner moves those keys out of active state into the inactive account bucket.refreshRemoteConnections()reads the temporarily absent auto-connect map;getAutoConnectForRemoteConnection()defaults SSH auto-connect to false.refreshAccountWindows()later callsfinishRendererAccountSwitch(), restoring account state. That completion path does not itself refresh the SSH catalog.Executing the exact installed owner-selection method against synthetic in-memory state, with an identity stub and no disk persistence, produced:
This confirms the state-hiding/restoration mechanism and matches the launch evidence. It is not a full-app debugger reproduction, a tested application patch, or a maintainer-confirmed diagnosis of every report in this issue.
Proposed durable fix
After successful account-state restoration, refresh/reconcile the SSH catalog from that account's restored preferences (or subscribe to account readiness and coalesce the refresh). Do not interpret pending account state as a persisted disabled preference.
Please preserve existing host IDs, SSH configuration, credentials, project associations, and healthy connections. Make the refresh idempotent, avoid duplicate connection attempts, honor disabled auto-connect and intentional disconnects, and prevent stale account-switch results from applying.
Suggested regression coverage:
The later report of success on
26.1106.51428/ CLI0.167.2is encouraging; we have not installed or verified that update. Please confirm whether it includes this reconciliation fix.No installed app patch, saved-settings edit, SSH/remote-host change, or restart was performed during this diagnosis. Host aliases/addresses, usernames, account/conversation IDs, credentials, and full logs are omitted. An undated server-side socket-conflict entry was excluded because it cannot be correlated with these launches.