What version of the Codex App are you using (From "About Codex" dialog)?
Codex iOS app — latest from App Store as of May 15, 2026.
What subscription do you have?
Pro
What platform is your computer?
- Codex iOS app: iPhone, iOS 18.x
- Codex desktop app (used as control case): Darwin 25.4.0 arm64 arm
What issue are you seeing?
The Codex iOS app's Add SSH Host flow consistently fails with Network connection was lost (repeating indefinitely) when targeting a remote Linux VM, while the Codex desktop app on macOS connects successfully to the exact same host with equivalent credentials.
Remote host:
codex-cli 0.130.0 installed at /usr/bin/codex (via npm i -g @openai/codex)
codex login status → Logged in using ChatGPT
- Debian 12 (bookworm), x86_64, Linux kernel 6.1
bubblewrap installed at /usr/bin/bwrap
- Reachable via private VPN (Tailscale); both iOS and macOS clients on the same tailnet
- SSH password auth enabled; key auth also available
Observed on the VM during iOS connection attempts:
sshd auth log: multiple Accepted password for <user> from <iOS Tailscale IP> entries — SSH layer succeeds.
pgrep -af codex shows codex app-server --listen unix:// running, started by iOS's SSH session.
~/.codex/app-server-control/app-server-control.sock exists; held by codex (verified with lsof).
~/.codex/app-server-control/app-server.log is empty after cleanup — no error logged when iOS attempts.
- iOS SSH session disconnects within ~5s after each attempt; app retries; loops with
Network connection was lost.
Control case (works): Codex macOS desktop app, same VM, same SSH config alias. Threads launch normally; codex app-server bridges over SSH; everything works.
Looks adjacent to / possibly same root cause as:
What steps can reproduce the bug?
- Provision a Linux VM (Debian 12, x86_64).
- Install Node 20 and
npm i -g @openai/codex → codex-cli 0.130.0.
- Run
codex login on the VM and authenticate via ChatGPT.
- Make the VM reachable from an iOS device (in my setup, via Tailscale; password SSH auth enabled on the VM).
- Open Codex iOS app → Add SSH Host → enter the VM's IP, port 22, username, password → Save.
- Tap the host to connect / start a thread.
Expected: iOS app connects and starts a Codex thread on the VM, matching the Codex desktop app behavior on macOS against the same host.
Actual: iOS app spins indefinitely showing Network connection was lost. SSH layer authenticates (visible in journalctl -u ssh); codex app-server process starts; but the iOS client never establishes a working session.
What is the expected behavior?
The iOS app should connect and start a Codex thread on the remote VM successfully, matching the Codex macOS desktop's behavior against the same host.
Additional information
- Codex desktop on macOS connects to the same VM via the same SSH alias and works correctly — both can't connect simultaneously due to the `app-server-control.sock` lock, but each works in isolation... except iOS never does.
- When iOS attempts to connect, no error is logged in `~/.codex/app-server-control/app-server.log` on the remote host. The failure is silent server-side and surfaces only as `Network connection was lost` on the client.
- Happy to provide additional diagnostics (sshd debug logs, codex-cli trace, packet capture from the VM side) if useful.
What version of the Codex App are you using (From "About Codex" dialog)?
Codex iOS app — latest from App Store as of May 15, 2026.
What subscription do you have?
Pro
What platform is your computer?
What issue are you seeing?
The Codex iOS app's Add SSH Host flow consistently fails with
Network connection was lost(repeating indefinitely) when targeting a remote Linux VM, while the Codex desktop app on macOS connects successfully to the exact same host with equivalent credentials.Remote host:
codex-cli 0.130.0installed at/usr/bin/codex(vianpm i -g @openai/codex)codex login status→Logged in using ChatGPTbubblewrapinstalled at/usr/bin/bwrapObserved on the VM during iOS connection attempts:
sshdauth log: multipleAccepted password for <user> from <iOS Tailscale IP>entries — SSH layer succeeds.pgrep -af codexshowscodex app-server --listen unix://running, started by iOS's SSH session.~/.codex/app-server-control/app-server-control.sockexists; held bycodex(verified withlsof).~/.codex/app-server-control/app-server.logis empty after cleanup — no error logged when iOS attempts.Network connection was lost.Control case (works): Codex macOS desktop app, same VM, same SSH config alias. Threads launch normally; codex app-server bridges over SSH; everything works.
Looks adjacent to / possibly same root cause as:
app server did not become ready on .../app-server-control.sock. Same control-socket failure pattern, different platform.URLSessionWebSocketTaskrejectingSec-WebSocket-Extensions: permessage-deflate. The workaround in that issue applies to--listen ws://setups, not the Unix-socket auto-launch flow the Codex iOS app uses.What steps can reproduce the bug?
npm i -g @openai/codex→codex-cli 0.130.0.codex loginon the VM and authenticate via ChatGPT.Expected: iOS app connects and starts a Codex thread on the VM, matching the Codex desktop app behavior on macOS against the same host.
Actual: iOS app spins indefinitely showing
Network connection was lost. SSH layer authenticates (visible injournalctl -u ssh);codex app-serverprocess starts; but the iOS client never establishes a working session.What is the expected behavior?
The iOS app should connect and start a Codex thread on the remote VM successfully, matching the Codex macOS desktop's behavior against the same host.
Additional information