{
  "slug": "railway-cli-adds-codex-remote-terminal-and-desktop-setup-6e42c5b990d0",
  "title": "railway CLI adds Codex remote terminal and Desktop setup",
  "tools": [
    "railway"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-09-10T06:24:54.000Z",
  "announced_at": "2026-09-10T06:24:54.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "When setting up or reconnecting a Railway cloud agent for Codex, use `railway code --codex` with the documented creation, `connect`, or `desktop-only` form; retrieve saved details with `railway code get-config [<agent-name-or-id>]`. Desktop-only saves SSH and project configuration for Codex Desktop’s next startup and leaves the backend running.",
    "examples": [
      "railway code --codex --new\nrailway code --codex --agent <agent-name> --dir <remote-directory>\nrailway code --codex connect [<agent-name-or-id>]",
      "railway code --codex desktop-only --new\nrailway code --codex desktop-only --agent <agent-name> --dir <remote-directory>",
      "railway code get-config [<agent-name-or-id>]"
    ],
    "gotchas": [
      "Version: v5.52.0",
      "--codex (required): Select Codex setup or connection.",
      "--new: Create a fresh VM for the new agent setup.",
      "--agent <name-or-id>: Select an existing agent for setup; used instead of `--new`.",
      "--dir <remote-directory>: Select the remote project directory.",
      "connect [<agent-name-or-id>]: Reconnect to a running Codex server; without an argument, discover running servers.",
      "desktop-only: Run Desktop setup without prompting to install or launch a local terminal client.",
      "get-config <agent-name-or-id>: Select saved connection details by agent name or ID; omit to retrieve the most recently saved connection.",
      "--name <name>: Override the generated Codex agent name.",
      "Prerequisite: Install the Railway CLI and authenticate with `railway login`.",
      "Prerequisite: Codex server must support `--ws-auth` and `--ws-token-file`; terminal mode uses a local client matching the server version.",
      "Terminal setup carries available local Codex sign-in and configured skills/MCP sync.",
      "Terminal setup starts App Server on port 8080 and verifies its public WebSocket handshake.",
      "Desktop-only setup verifies the public endpoint, registers SSH, saves the remote project for Codex Desktop to import at its next startup, then exits while leaving the backend running.",
      "Desktop-only setup does not prompt to install or launch a local terminal client.",
      "Generated names are checked against existing names before creation; when using the default cloud agents project, the label comes from the local repository or directory instead of the project name.",
      "Reconnect migrates older default aliases while preserving custom settings.",
      "Tools, files, and threads live on the VM.",
      "Docs conflict: Current Railway CLI documentation describes newer behavior: Codex App Server defaults to a configured code port (default 4096) or legacy port 8080; the v5.52.0 README says port 8080. Used the version-tagged documentation."
    ]
  },
  "why_it_matters": "Set up or reconnect a local Codex terminal or Desktop client to a persistent Railway cloud agent.",
  "sources": [
    "https://github.com/railwayapp/cli/releases/tag/v5.52.0",
    "https://github.com/railwayapp/cli/pull/1188",
    "https://github.com/railwayapp/cli/blob/v5.52.0/README.md"
  ],
  "rank": 0.9704,
  "judge": {
    "publish": true,
    "judge_model": "codex-cli/gpt-6-luna+typesafe/jev-1.13.0",
    "prompt_version": "extract-v7+enrich-v2+judge-v2x3+jev-publish-v1"
  },
  "review_state": "approved",
  "provenance": {
    "run_id": "wave1b-20261016",
    "verdict_id": "wave1b-20261016:wave1b-20261016-b024381f20d5a9e2-0:gate",
    "evidence_hash": "b0825c4e2a4c362b4596ceac8a45ae49746909ab99d43140c79a70591ee0fe77"
  },
  "review": {
    "draft_hash": "8a6a9073214b8a74e641663743bf00cfb922facbe1873a218e8c0e44fa7dcc90",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-07T00:00:00.000Z",
    "decision": "wave1b-20261016:gate",
    "reason": "3 of 3 judge runs approved with p_yes >= 0.9 (mean 0.97 >= 0.9; 2 needed) and Jev gave 0.64 (>= 0.6 needed)."
  }
}
