The quickest way to review a frontend change is to click through it. When a coding agent made the change on your laptop, that is easy: it ran npm run dev and you opened localhost. When a team runs several agents at once, each on its own branch, the laptop stops working as a place to do this. Two dev servers want the same port, node_modules from one branch breaks another, and the agent that is still working gets in the way of the one you want to look at.
Giving every agent its own machine fixes that, and it leaves one question: how do you open the app an agent is running on a machine in the cloud? This post covers the answer for Sandscale workspaces, using the forms in the --help of the Sandscale CLI (version 1.4.1).
One workspace per agent
A Sandscale workspace is a persistent cloud computer: a Firecracker microVM with its own kernel and disk, where you can run Claude Code, Codex, Gemini CLI or your own agent. With one workspace per agent, each agent has its own checkout, its own installed dependencies and its own ports. Two agents can both run a dev server on port 3000, because they are on different machines.
Creating one and connecting to it:
sandscale workspace templates-list
sandscale workspace create --name agent-checkout --template-id TEMPLATE_ID
sandscale workspace ssh agent-checkout
create makes the workspace and starts it. ssh connects with a short-lived certificate that Sandscale signs and checks the workspace’s host key. The workspace guide has more. Inside, the agent works the way it would on a laptop. Our posts on Claude Code headless and codex exec in a workspace cover running the agent itself.
Forward the port
When the agent has started the dev server on its workspace, forward that port to your computer. The workspace has to be running; sandscale workspace start --ws-id WORKSPACE_ID starts a stopped one.
sandscale workspace port-forward agent-checkout 3000
Use the port the dev server reports. One number means the same port on both ends. To use a different local port, give LOCAL:REMOTE:
sandscale workspace port-forward agent-checkout 8080:3000
Now open http://127.0.0.1:8080 on your computer. You see the app as that agent built it, from its branch and its dependencies.
What the CLI’s help says about how this works:
- It runs
ssh -N -Lthrough Sandscale. Each forward listens on this computer “and reaches that port on the workspace, until Ctrl+C”. - It listens on
127.0.0.1unless you pass--bind. The workspace guide adds: “Nothing is opened to the internet.” - If ssh cannot bind a local port, it fails rather than run without it.
- You can forward several ports in one command, at most 32. A frontend and its API, or an app and its database:
sandscale workspace port-forward agent-checkout 3000 5432:5432
If the page does not load, check from inside the workspace that the dev server is running and which address and port it listens on.
Reviewing several agents side by side
With three agents on three workspaces, each running a dev server on port 3000, give each one its own local port:
sandscale workspace port-forward agent-checkout 3001:3000
sandscale workspace port-forward agent-search 3002:3000
sandscale workspace port-forward agent-settings 3003:3000
Run each in its own terminal. Then compare the three tabs. Nothing on the agents’ side changed: each one still has port 3000 to itself.
Sharing with a teammate
The forward listens on 127.0.0.1 so that only you can reach it. --bind 0.0.0.0 (or another address) makes it reachable from your network, and the CLI warns for any address that is not loopback. Your local network is rarely the audience you want for unreleased work, so think before using it.
For a teammate, two options keep things simpler:
- Share the workspace with them in the console, and they run the same
port-forwardwith their own Sandscale sign-in. - Preview links. The pricing page lists them on every plan, shared with your team, and public links on Pro and up.
Why not just tunnel from the laptop
You could run the agent on a laptop and expose its dev server with a tunnel. That brings back the problems this post started with: ports and dependencies shared between agents, and an agent whose code runs on the machine that holds your credentials. Port-forwarding from a workspace keeps the agent’s code on the agent’s machine, and only the HTTP traffic you asked for comes back to you.
What it does not do
- It does not keep the workspace running. A workspace stops when idle and can have a time to live;
sandscale workspace updatesets both, within your organization’s policy. - It does not reload anything for you. Whatever hot reload the dev server has works as it would locally, over the forwarded port.
- It does not review the code. Clicking through the app is one half of review. The diff is the other.
To create your first workspace, start with the Quickstart and the workspace guide.