Skip to content

Remote SSH fails with "codex path probe timed out after 60000ms" although exact probe succeeds outside Codex Desktop #51461

Open

Description

@sqylab-design

What version of the Codex App are you using (From “About Codex” dialog)?

  • Codex App 26.930.41038 (published Oct 3, 2026) - Codex App 26.930.61225 (published Oct 5, 2026) Also tested an older rollback build (26.818.61809) with the same Remote SSH timeout.

What subscription do you have?

ChatGPT Plus

What platform is your computer?

Microsoft Windows NT 10.0.19042.0 x64

What issue are you seeing?

Summary

Codex Desktop fails to connect to a Debian VPS over Remote SSH with:

SSH: codex path probe timed out after 60000ms

However, the SSH connection itself works correctly, authentication succeeds, command -v codex works remotely, and even the exact remote probe command generated by Codex Desktop succeeds immediately when executed outside the app.

This strongly suggests an issue in Codex Desktop's handling of the SSH probe process/output rather than a server-side SSH or PATH problem.

Environment

Local machine:

  • Windows x64
  • Codex Desktop
  • OpenSSH_for_Windows_7.7p1
  • SSH key: ED25519
  • SSH agent enabled

Remote machine:

  • Debian 12
  • OpenSSH_9.2p1 Debian-2+deb12u10
  • Shell: /bin/bash
  • Node.js: v22.23.1
  • npm: 10.9.8
  • Codex CLI: codex-cli 0.160.1
  • Codex path: /usr/bin/codex

Codex Desktop transport:

  • ssh-websocket-v0

Failure stage seen in Codex Desktop logs:

  • sshSetupStage=remote_codex_lookup
  • SSH: codex path probe timed out after 60000ms

SSH configuration

The host is configured through ~/.ssh/config with an SSH alias. The key is loaded in the Windows SSH agent. A normal SSH connection works without prompting for the key passphrase.

What works

1. Normal SSH connection

ssh hyperpbx

Works correctly.

2. Non-interactive Codex lookup

ssh -T hyperpbx "command -v codex"

Result:

/usr/bin/codex

3. Login + interactive shell lookup

ssh -o BatchMode=yes hyperpbx "timeout 10s /bin/bash -l -i -c 'command -v codex'"

Result:

bash: cannot set terminal process group (...): Inappropriate ioctl for device
bash: no job control in this shell
/usr/bin/codex

The command exits normally.

4. SSH exec channel

ssh -v -o BatchMode=yes hyperpbx "sh -c 'printf CODEX_PROBE_OK; command -v codex; exit 0'"

Result:

Authentication succeeded (publickey).
Sending command: sh -c 'printf CODEX_PROBE_OK; command -v codex; exit 0'
CODEX_PROBE_OK/usr/bin/codex
Exit status 0

5. Exact Codex Desktop path probe

While Codex Desktop was attempting the connection, I captured the exact ssh.exe command line using:

Get-CimInstance Win32_Process |
    Where-Object { $_.Name -eq "ssh.exe" } |
    Select-Object ProcessId,ParentProcessId,CommandLine |
    Format-List

Codex Desktop launches SSH using:

-v
-o BatchMode=yes
-o ServerAliveInterval=15
-o ServerAliveCountMax=12

The remote shell wrapper checks $SHELL, sets CODEX_REMOTE_PAYLOAD, starts the login shell with -l -i, sets CODEX_HOME, adjusts PATH, checks command -v codex, and emits an 8-byte probe marker.

I reproduced this exact probe outside Codex Desktop using Python subprocess.run() so that PowerShell quoting would not modify the command.

Result:

RETURN CODE: 0
STDOUT RAW: b'\xb0\x9e\xf7)\xde\xc7\xf2\xb0'

SSH debug output also shows:

Authentication succeeded (publickey).
Sending command: ...
Exit status 0

The complete probe finishes in approximately 0.2 seconds.

Server-side confirmation

While Codex Desktop is trying to connect, the Debian SSH logs show successful public-key authentication:

Accepted publickey for <user> from <client-ip> ...
pam_unix(sshd:session): session opened for user <user>

Multiple SSH sessions are opened successfully. SFTP sessions also start correctly. A separate sshd: <user>@notty session remains open during the Codex path probe attempt and eventually corresponds to the 60-second timeout.

Codex Desktop behavior

Despite the exact same probe succeeding outside Codex Desktop, the app waits approximately 60 seconds and then reports:

SSH: codex path probe timed out after 60000ms

The app then retries and repeats the same behavior.

Troubleshooting already performed

  • Verified SSH authentication
  • Verified SSH agent
  • Verified BatchMode
  • Verified remote exec channel
  • Verified remote shell
  • Verified login + interactive shell behavior
  • Verified PATH
  • Verified /usr/bin/codex
  • Verified Codex CLI version
  • Verified exact Codex-generated probe
  • Verified binary probe marker output
  • Verified clean SSH process state before retry
  • Reset Codex Desktop local state
  • Tested more than one Codex Desktop version
  • Same timeout remains

Expected behavior

Codex Desktop should detect the successful remote probe and continue with remote app-server setup.

Actual behavior

The remote probe succeeds at the SSH/process level but Codex Desktop does not detect completion and waits until:

codex path probe timed out after 60000ms

Suspected area

Possibly in the Windows Desktop handling of:

  • spawned ssh.exe process lifecycle
  • stdout/stderr handling
  • binary probe marker detection
  • EOF / process completion detection
  • ssh-websocket-v0 remote setup logic

The SSH server itself appears to behave correctly.

What steps can reproduce the bug?

  1. On Windows, configure a working SSH alias for a Debian 12 host in ~/.ssh/config and load the ED25519 key into the Windows SSH agent.
  2. Verify that the host works from PowerShell:
ssh hyperpbx
ssh -T hyperpbx "command -v codex"

The second command returns /usr/bin/codex.

  1. In Codex Desktop, go to Settings > Connections > SSH and enable the discovered hyperpbx connection.
  2. Codex Desktop opens successful SSH sessions on the server, but the connection remains on "Connecting".
  3. After approximately 60 seconds, Codex Desktop reports:
SSH: codex path probe timed out after 60000ms
  1. Capture the exact ssh.exe command generated by Codex Desktop with:
Get-CimInstance Win32_Process |
    Where-Object { $_.Name -eq "ssh.exe" } |
    Select-Object ProcessId,ParentProcessId,CommandLine |
    Format-List
  1. Re-run the exact remote path probe outside Codex Desktop using Python subprocess.run() to preserve quoting. The probe completes in about 0.2 seconds with exit code 0 and returns the expected 8-byte binary marker.

No session ID, token limit, or context-window usage is applicable because the failure happens during Remote SSH setup before a Codex session is established.

What is the expected behavior?

Codex Desktop should recognize that the remote Codex path probe completed successfully, detect /usr/bin/codex, and continue with the Remote SSH app-server setup instead of waiting for the 60-second timeout.

Additional information

The same failure persists after resetting Codex Desktop local state and after testing more than one Codex Desktop version.

The server-side sshd logs confirm successful public-key authentication and session creation during each Codex Desktop attempt. Manual SSH, SFTP, non-interactive exec, login/interactive shell execution, and the exact Codex-generated path probe all work correctly outside Codex Desktop.

For privacy, public IP addresses, the local Windows username, and the remote username can be redacted in any attached logs.

Activity

  1. added
    app
    on Oct 6, 2026
  2. added
    bug
    windows-os
    connectivity
    on Oct 6, 2026
  3. sigmalko commented on Oct 17, 2026

    @sigmalko

    Related diagnostic finding: SSH path probes and login-shell PATH initialization

    I encountered a superficially similar Codex Desktop Remote SSH connection failure on Windows, but identified a different root cause that may be useful when diagnosing remote path probe failures.

    In my case:

    • Normal SSH worked.
    • ssh -T host 'command -v codex' successfully found Codex CLI 0.163.0.
    • Codex Desktop could not detect the CLI.
    • The remote target was a Linux Docker container using a custom login-shell wrapper.

    Using PowerShell's Get-CimInstance Win32_Process, I captured Codex Desktop's actual SSH invocation and confirmed that it runs the remote shell using:

    exec "$SHELL" -l -i -c '...'

    Reproducing this shell invocation revealed that PATH changed from:

    /home/agent/.npm-global/bin:/usr/local/bin:/usr/bin:/bin
    

    to:

    /usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
    

    Consequently, the CLI lookup failed with exit code 127.

    The important diagnostic distinction is:

    A successful ordinary SSH lookup is not sufficient to validate Codex Desktop's login-shell PATH probe.

    For similar reports, I suggest independently testing:

    "$SHELL" -l -i -c 'echo "$PATH"; command -v codex'

    This particular failure is different from the one described in this issue, where the exact probe reportedly succeeds outside Codex Desktop but the app still times out.

    Therefore, I am not claiming that this workaround fixes the reported 60-second timeout.

    However, I believe Codex Desktop diagnostics should expose the remote probe's effective shell, PATH, exit status, and relevant stderr, so that environment initialization errors can be distinguished from client-side probe lifecycle or timeout bugs.

    Related issue: #19744 (remote environment initialization and PATH inconsistencies).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    appbugconnectivityremotewindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions