Support SSH deep links for adding connections and starting threads in remote folders
What variant of Codex are you using?
App
What feature would you like to see?
Codex currently supports:
codex://settings/connections/ssh/add?name=devbox
but name here means an existing Host devbox entry in ~/.ssh/config. It would be great to support SSH config aliases, Codex-saved connections and manual configurations.
First, expand the SSH add route to match the Add SSH connection UI:
codex://settings/connections/ssh/add?
displayName=Devbox
&hostname=user%40host.com
&sshPort=22
&authMode=identity
&identityFilePath=%2FUsers%2Fme%2F.ssh%2Fid_ed25519
Suggested params:
sshConfigName= existing Host alias from ~/.ssh/config
displayName= Codex connection display name to save
hostname= host.com or user@host.com
sshPort= optional SSH port
authMode= none | identity
identityFilePath= used when authMode=identity
name= could remain as a backward-compatible alias for sshConfigName=, but the clearer param should distinguish it from Codex’s saved display name.
Second, add a new-thread route for SSH remote folders. This should reuse an existing saved Codex connection when possible, or create one first if full connection details are provided.
Example: create or reuse a connection, then start a new thread in a remote folder:
codex://threads/new?
remote=ssh
&displayName=Devbox
&hostname=user%40host.com
&sshPort=22
&authMode=identity
&identityFilePath=%2FUsers%2Fme%2F.ssh%2Fid_ed25519
&remoteFolder=%2Fhome%2Fme%2Frepo
&prompt=Fix%20the%20failing%20tests
Example: open by existing saved Codex connection display name:
codex://threads/new?
remote=ssh
&savedConnectionDisplayName=Devbox
&remoteFolder=%2Fhome%2Fme%2Frepo
&prompt=Fix%20the%20failing%20tests
Example: open via an existing SSH config alias:
codex://threads/new?
remote=ssh
&sshConfigName=devbox
&remoteFolder=%2Fhome%2Fme%2Frepo
&prompt=Fix%20the%20failing%20tests
Expected behavior:
savedConnectionDisplayNamelooks up an existing Codex-saved SSH connection.displayNameis the name to save when creating a new Codex-managed SSH connection.sshConfigNamerefers only to an existingHostentry in~/.ssh/config.- If a matching saved connection already exists, reuse it.
- If no saved connection exists but full connection params are provided, prefill or create the SSH connection after user confirmation, then continue to the thread.
- Use
remoteFolderfor the remote filesystem path, leaving existing localpathbehavior unchanged. - Require confirmation before saving or connecting to a new SSH host.
Additional information
VS Code supports something similar (but simpler): https://github.com/microsoft/vscode-remote-release/issues/4779#issuecomment-1220475865
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗