# Reviewing what a coding agent built: port-forward its dev server from the agent's own workspace

> When each coding agent works on its own cloud machine, you review its work by opening the app it is running there. How sandscale workspace port-forward does that over SSH, what it listens on, and why one workspace per agent keeps ports and branches from colliding.

When each coding agent works on its own cloud machine, you review its work by opening the app it is running there. How sandscale workspace port-forward does that over SSH, what it listens on, and why one workspace per agent keeps ports and branches from colliding.

November 30, 2026 · 4 min read · The Sandscale team

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](https://sandscale.dev/workspaces) 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:

```sh
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](https://sandscale.dev/docs/guides/workspaces) has more. Inside, the agent works the way it would on a laptop. Our posts on [Claude Code headless](https://sandscale.dev/blog/claude-code-headless-in-a-cloud-workspace) and [codex exec](https://sandscale.dev/blog/codex-exec-in-a-cloud-workspace) 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.

```sh
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`:

```sh
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 -L` through Sandscale. Each forward listens on this computer “and reaches that port on the workspace, until Ctrl+C”.
- It listens on `127.0.0.1` unless you pass `--bind`. The [workspace guide](https://sandscale.dev/docs/guides/workspaces) 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:

```sh
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:

```sh
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-forward` with their own Sandscale sign-in.
- Preview links. The [pricing page](https://sandscale.dev/pricing) 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 update` sets 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](https://sandscale.dev/docs/quickstart) and the [workspace guide](https://sandscale.dev/docs/guides/workspaces).

**On this page**

1. One workspace per agent
2. Forward the port
3. Reviewing several agents side by side
4. Sharing with a teammate
5. Why not just tunnel from the laptop
6. What it does not do

**Run your agents in a box of their own**

Each sandbox is a Firecracker microVM. Free includes 100 awake vCPU-hours a month.

[Start free](https://cloud.sandscale.dev/auth/signup)

## Keep reading

- [November 30, 2026 · **MCP servers your team's agents install: run them on the agent's own machine, not the laptop with everyone's keys** · A local MCP server runs with the same rights as the client that starts it. What the MCP spec's security guidance says about that, and how to put the coding agent and its MCP servers on a microVM of their own, with no code to write.](https://sandscale.dev/blog/running-untrusted-mcp-servers-in-a-microvm)
- [November 30, 2026 · **MCP tool annotations explained: what readOnlyHint and destructiveHint mean for teams approving agent tool calls** · What each MCP tool annotation means according to the spec, what Claude Code, Codex and Cursor do with them according to their docs, and how a team using coding agents can decide what to auto-approve and what a person must see.](https://sandscale.dev/blog/mcp-tool-annotations-explained)

---
Source: https://sandscale.dev/blog/port-forwarding-a-dev-server-from-a-workspace
