Remote SSH connection fails when Node.js is installed via nvm: "No codex found in PATH" and silent app-server launch failure
Open 💬 5 comments Opened Apr 27, 2026 by danohn
What version of the Codex App are you using (From “About Codex” dialog)?
Version 26.422.30944 (2080)
What subscription do you have?
ChatGPT Plus
What platform is your computer?
Darwin 25.4.0 arm64 arm
What issue are you seeing?
Codex Desktop fails to connect to remote SSH hosts when Node.js (and the codex CLI) is installed via nvm. There are two distinct failures:
- "No
codexfound in PATH" — the PATH probe uses a login+interactive shell (/bin/bash -l -i) but nvm may not initialise, socodexisn't found even though it's installed.
- Silent ECONNRESET after the probe succeeds — even when the PATH probe passes (e.g. after symlinking
codexto/usr/local/bin), the app-server launch fails silently. Codex Desktop launches the server via a non-interactive SSH command using/usr/bin/env node, which can't findnodesince nvm isn't loaded. The WebSocket immediately closes with code 1006 (ECONNRESET) and no actionable error is shown in the UI. The actual error (/usr/bin/env: 'node': No such file or directory) is only visible in/tmp/codex-app-server-ssh-ws-v0.logon the remote.
What steps can reproduce the bug?
- Install Node.js via nvm on a remote Linux machine
- Install the
codexCLI via npm (npm install -g @openai/codex) - Add the remote host to
~/.ssh/configon the local macOS machine - Open Codex Desktop and attempt to enable the remote SSH connection
- Observe "No
codexfound in PATH" error - Symlink
codexto/usr/local/bin/codexon the remote to get past step 5 - Observe persistent connection failure with ECONNRESET — no actionable error shown in the UI
What is the expected behavior?
Codex Desktop should use the same shell environment for both the PATH probe and the app-server launch, so nvm-managed binaries work consistently without manual symlinks. If the launch does fail, the actual error from the remote (e.g. node not found) should be surfaced in the UI rather than a generic connection failure.
Additional information
- Codex Desktop version: 0.125.0-alpha.3 (macOS)
- Remote OS: Linux (Debian/Ubuntu), Node.js installed via nvm v24.15.0
- The workaround requires two symlinks on the remote machine:
ln -sf ~/.nvm/versions/node/$(node --version)/bin/codex /usr/local/bin/codex
ln -sf ~/.nvm/versions/node/$(node --version)/bin/node /usr/local/bin/node
- The real server-side error is logged to
/tmp/codex-app-server-ssh-ws-v0.logon the remote, which is not currently surfaced anywhere in Codex Desktop
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗