railway code explicit harness launches default to fresh VMs and use native clients
Introduced 2026-09-11 · score 0.91
HOW TO USE IT
When launching with an explicit harness flag, `railway code` creates a fresh VM by default. Use `connect [agent]` to reconnect to an existing backend, `--agent <name-or-id>` to select an agent for setup, or `railway ca ssh <agent>` for a shell; resume a remote Codex thread with `/resume` or select it in the CA sidebar.
railway code --opencode2 --name my-boxrailway code --codex connect <agent>railway ca ssh <agent>WHY THIS HELPS
Launch a cloud coding agent with a selected harness and work with its remote conversations.
REQUIREMENTS AND LIMITATIONS
- Version: v5.53.0
- --codex, --opencode, --opencode2, --claude, --grok, --railway (required): Select the harness; each explicit harness flag starts a fresh VM by default. Choose the flag for the desired harness.
- connect [agent]: Reconnect to an existing backend; the agent name or ID can be supplied to target it.
- --agent <name-or-id>: Select an existing agent for explicit server setup.
- --new: Accepted but optional when launching with an explicit harness flag.
- remote: A harness launch in remote mode; fresh VM default applies.
- desktop-only: Codex Desktop-only setup mode; fresh VM default applies.
- --: Passes subsequent arguments to the harness; fresh VM default applies to harness arguments after it.
- <agent> (required): Agent name or ID for `railway ca ssh`; opens a login shell.
- /resume: Codex command to reopen a remote thread.
- Prerequisite: Authenticate with a Railway account using `railway login` before using the CLI.
- Fresh VM defaults apply to explicit harness flags, including `remote`, Codex `desktop-only`, and harness arguments after `--`.
- Bare launches and shared CA/Desktop provisioning retain their existing targeting behavior.
- If the matching local terminal client is missing, Railway offers to install it; declining, Esc, or Ctrl+C at the prompt leaves the server running and prints connection details.
- An occupied port or a different running project directory requires another agent.
FIRST-PARTY EVIDENCE
- https://github.com/railwayapp/cli/releases/tag/v5.53.0
- https://github.com/railwayapp/cli/pull/1193
- https://github.com/railwayapp/cli/blob/v5.53.0/README.md
Check the installed version and the source before using it. Entry JSON