I've been going down a rabbit hole lately and I figured I'd share what I'm learning — partly to explain it to myself, partly because it's actually pretty cool.
The topic: running AI coding agents like Claude Code, OpenCode, and Codex remotely on Railway instead of your local machine.
If you haven't used one yet, a coding agent is basically an AI that doesn't just suggest code — it acts. It opens files, runs commands, edits code, and works through a problem step by step with minimal hand-holding. Think of it less like autocomplete and more like a junior developer you can delegate tasks to.
Claude Code, OpenCode, and Codex are three popular ones right now, each with slightly different strengths and personalities.
This was my first question too. The short answer: it works, until it doesn't.
When you run an agent locally, you're tying it to your laptop. Close the lid and the session dies. Want to run two agents at once? Hope you have RAM to spare. And since agents have shell access, they're running commands directly on your machine — which is fine until it isn't.
Running them in the cloud solves all of this: sessions stay alive, you get proper resource isolation, and you can run as many in parallel as you need.
Railway is a cloud deployment platform that's genuinely pleasant to use (I know that sounds like ad copy but it's true — the developer experience is really good). You can deploy services, link them together, manage environment variables, and spin things up without fighting a wall of config files.
For this kind of project, it's a great fit because:
What I'm learning is that you can start dead simple — one service, one agent — and grow from there.
The more interesting piece is building a control plane: a small orchestration layer that can launch new agent instances on demand, route you to the right one, and clean them up when you're done. Instead of one hardcoded agent running forever, you get a little platform that spins agents up and down dynamically.
It's a bit like having a manager (the control plane) that assigns workers (agents) to tasks as they come in, rather than always keeping one worker standing around waiting.
I'm still working through the details of how this all fits together, but even the basic single-service version is already useful.
Honestly, a lot. The networking and access model is the trickiest part — how do you securely connect to an agent running on a remote server without just poking a hole in your firewall? Railway has some primitives for this but I'm still getting my head around the right pattern.
I'll share more as I go. If you're also exploring AI agents or Railway, would love to hear what you're building.