Codex Desktop keeps auto-retrying an auth-failed stale SSH connection instead of backing off cleanly

Open 💬 0 comments Opened Jul 4, 2026 by henrydontbbai

## Summary

On my Windows machine, Codex Desktop keeps automatically retrying a saved remote SSH connection after authentication has already failed.

This may have been triggered by a stale local remote configuration, but the app appears to keep retrying the failed connection in the background instead of backing off cleanly or requiring explicit user action.

Environment

  • Platform: Windows
  • Date observed: July 4, 2026

Connection involved

  • hostId: remote-ssh-codex-managed:<saved-remote>
  • target: <user>@<private-lan-host>

Actual behavior

The connection target is reachable, but authentication fails.

Observed failure:

  • Permission denied (publickey,password,keyboard-interactive)

After that, Codex continues to retry the same connection automatically in the background.

From the local SSH debug output, this looks like:

  • TCP connection succeeds
  • SSH handshake succeeds
  • host key is recognized
  • authentication does not succeed
  • Codex schedules another reconnect attempt

So this does not look like a raw network outage. It looks like an auth-failed saved connection that keeps being retried.

Why this may be partly environment-triggered

This may have been triggered by my local saved remote setup rather than a pure app-created condition.

For example:

  • the saved remote target may be stale
  • the expected private key may be missing or no longer valid
  • the saved connection may no longer be appropriate to auto-start

So I am not claiming the auth failure itself is necessarily a Codex bug.

Why this still seems like a Codex Desktop issue

Even if the saved connection is stale or locally misconfigured, Codex should handle that state more safely.

After repeated auth failures, I would expect the app to:

  • stop retrying automatically after a small number of failures
  • mark the connection as failed/idle
  • require explicit user action before reconnecting
  • clearly surface that this is a credential/authentication problem rather than a transient reconnectable state

The likely issue here is not “SSH auth failed”, but rather:

Codex keeps auto-retrying an auth-failed SSH connection instead of backing off cleanly.

Expected behavior

After authentication fails repeatedly, Codex Desktop should do one of the following:

  • stop background reconnect attempts
  • classify the connection as non-retriable until user action
  • require manual reconnect after credentials are fixed
  • make the failed-auth state clearly visible to the user

Impact

  • persistent background retry noise
  • repeated failed SSH attempts
  • unnecessary resource usage
  • confusing connection state
  • possible contribution to app instability over time

Notes

This should likely be tracked separately from any Git workspace / turn-diff / repo-watcher issues.

View original on GitHub ↗