Codex App Remote SSH fails on macOS remote because bootstrap uses GNU-style chmod --
What version of the Codex App are you using (From “About Codex” dialog)?
26.429.20946
What subscription do you have?
ChatGPT Pro ($200/mo)
What platform is your computer?
Local client:
Darwin 25.3.0 arm64 arm
Remote SSH host:
Darwin 25.3.0 arm64 arm
Local and remote Codex CLI:
codex-cli 0.128.0
What issue are you seeing?
Codex App Remote Connections discovers a macOS SSH host and can run remote probes, but enabling the connection fails with:
Error: Codex app-server websocket closed (code=1006)
The local Codex App logs show the remote SSH bootstrap command includes GNU-style chmod --:
umask 077; mkdir -p -- "${CODEX_HOME:-$HOME/.codex}/app-server-control" && chmod 700 -- "${CODEX_HOME:-$HOME/.codex}/app-server-control" && nohup codex app-server --listen unix:// >"${CODEX_HOME:-$HOME/.codex}/app-server-control/app-server.log" 2>&1 &
On macOS/BSD, /bin/chmod does not accept a standalone -- end-of-options marker, so the bootstrap fails with:
chmod: --: No such file or directory
The control socket is never created, and then the proxy step fails:
Error: failed to connect to socket at $HOME/.codex/app-server-control/app-server-control.sock
Caused by:
No such file or directory (os error 2)
This is surfaced in the UI only as the generic websocket 1006 error.
What steps can reproduce the bug?
- Use Codex App on macOS.
- Add/connect to another macOS host via Settings -> Connections -> Remote SSH.
- Ensure the remote host uses standard macOS
/bin/chmod. - Enable the connection.
- Observe
Codex app-server websocket closed (code=1006).
Manual proof on the remote macOS host:
# Exact bootstrap shape emitted by Codex App
exact_rc=1
exact_stderr=
chmod: --: No such file or directory
exact_socket_exists=no
# Same command with only chmod changed to BSD-compatible syntax
fixed_rc=0
fixed_stderr=
fixed_socket_exists=yes
After manually starting the app-server with BSD-compatible chmod syntax, the socket exists and proxy succeeds:
socket_exists=yes
$HOME/.codex/app-server-control/app-server-control.sock
proxy_status=exited
proxy_rc=0
proxy_stderr=
What is the expected behavior?
Remote SSH bootstrap should work on macOS remotes. The bootstrap command should either avoid chmod -- or use a portable form such as:
chmod 700 "${CODEX_HOME:-$HOME/.codex}/app-server-control"
Additional information
SSH itself works. Codex App can discover the host and run remote codex --version probes. The failure appears to be in the Desktop Remote Connections bootstrap command, not SSH reachability or the remote Codex CLI installation.
Related but not exact duplicates found while searching:
- #19302: Remote SSH bootstrap with csh/tcsh login shells
- #19300: stale remote app-server state masking errors
- #19688: UDS handshake issue, closed and not the same failure mode
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗