Expose a supported way to register/enable SSH remote projects from automation

Open 💬 1 comment Opened May 7, 2026 by hlky

Feature request

Please expose a supported CLI, app-server, or documented state/API path for automation to register and open Codex Desktop SSH remote projects.

We are building a public Codex skill for provisioning GPU-backed Runpod remotes:

https://github.com/hlky/runpod-codex-remote

The intended workflow is:

  1. User asks Codex to create a GPU remote, for example:

Create an A40 Runpod pod with a 50GB workspace, clone hlky/diffusers, pre-auth Codex/GitHub, and add it as a Codex remote project

  1. The skill creates the Runpod pod.
  2. The skill installs/validates SSH, Codex CLI, gh, hf, aws, etc.
  3. The skill clones the repo into /workspace/<repo>.
  4. The skill writes a concrete SSH alias into ~/.ssh/config, e.g. diffusers-a40.
  5. Ideally, the skill then registers/enables the Codex Desktop remote project so the user can immediately continue in the remote workspace.

Currently step 6 still requires manual UI work:

  • Settings > Connections
  • Refresh
  • Enable the discovered SSH host
  • Home > New remote project
  • Select the remote host
  • Select /workspace/<repo>

Current workaround

We can best-effort seed ~/.codex/.codex-global-state.json with fields like:

  • remote-connection-auto-connect-by-host-id
  • remote-projects
  • project-order
  • active-remote-project-id
  • selected-remote-host-id
  • electron-persisted-atom-state.agent-mode-by-host-id

This works unreliably while Codex Desktop is already running, because the app may rewrite the global state file from in-memory state and remove externally inserted remote-projects entries. It is also app-version-sensitive and undocumented, so it does not feel appropriate for a public automation workflow.

From inspecting the packaged app, the UI appears to use internal renderer bridge calls like get-global-state / set-global-state, but those are not available to an external skill script. I also checked the generated codex app-server schema and did not find a public method for global state or remote project registration.

Requested capability

Any one of these would work well:

Option A: CLI

codex app remote add \
  --ssh-alias diffusers-a40 \
  --remote-path /workspace/diffusers \
  --label diffusers \
  --auto-connect \
  --agent-mode full-access \
  --open

Option B: app-server method

Expose methods along the lines of:

  • remote/listHosts
  • remote/refreshHosts
  • remote/enableHost
  • remote/registerProject
  • remote/openProject

Option C: documented state contract

Document the supported global-state shape and provide a way to force Codex Desktop to reload or reconcile it safely.

Why this matters

This would let Codex skills and external tooling create a complete "GPU workspace ready in Codex" flow:

  • Provision remote compute.
  • Configure SSH.
  • Preinstall Codex and project dependencies.
  • Clone the repository.
  • Open the remote project in Codex Desktop without manual setup.

For cloud GPU workflows, especially temporary Runpod/Lambda/etc. machines, removing the manual Desktop setup step makes the experience much closer to "ask Codex for a remote dev environment and start working."

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗