# Run Claude Code and Codex on a remote dev box

> Run Claude Code or Codex on a cloud Linux box and keep working locally: your project synced both ways, dev servers on localhost, or the box in Cursor or VS Code.

URL: https://prized.dev/docs/remote-dev-box

On a remote box, the agent's installs, builds, tests and dev servers run on the box's CPU instead of your laptop's, and keep running while the laptop sleeps. Prized makes the box feel local: your project folder syncs both ways, and the box's ports open on your localhost.

## 1. Create a box and sync your project [#1-create-a-box-and-sync-your-project]

```bash
cd ~/code/myproject
npx prized
```

It signs you up, starts a box on $30 of free credit with no card, and syncs this folder with `~/code/myproject` on the box; edits travel both ways in under a second ([Sync](https://prized.dev/docs/sync)). Pick **Terminal**, then **Claude Code** or **Codex**: after asking, it signs that agent in on the box, and `prized agents handoff codex` (or `claude`) adds the other later ([Credentials](https://prized.dev/docs/credentials)).

Already signed in? Run `prized setup` in the folder instead ([Quickstart](https://prized.dev/docs/quickstart#4-set-up)).

## 2. Start the agent [#2-start-the-agent]

```bash
prized agents run claude --session claude-myproject --dir code/myproject
```

This starts Claude Code in a tmux session named `claude-myproject`, in `~/code/myproject` (`--dir` is relative to your home on the box); `prized agents run codex` with its own session name does the same for Codex. Naming the session and folder keeps each project's agent apart when the box holds several. Attach with `prized ssh -s claude-myproject` and detach with Ctrl-b, then d; the agent keeps working either way ([Agents](https://prized.dev/docs/agents)).

## 3. Open the dev server on localhost [#3-open-the-dev-server-on-localhost]

```bash title="you@box ~/code/myproject"
npm run dev
# ready on http://localhost:3000
```

About two seconds later, `localhost:3000` opens on your laptop, websockets included. Most ports from 3000 to 9999 mirror on their own; `prized ports ls` lists them, and `prized proxy` forwards one outside that range ([Ports](https://prized.dev/docs/ports#limits)).

## Or edit over SSH [#or-edit-over-ssh]

Setup adds the box to your SSH config under its name, so **Remote-SSH: Connect to Host** in Cursor, or in VS Code with its Remote - SSH extension, connects with nothing else to set up. Open `~/code/myproject`: the editor then works on the box's copy, and its terminal runs on the box. Sync gives every tool on your laptop a real folder; Remote-SSH works without one ([Sessions](https://prized.dev/docs/sessions#editors-and-other-tools)).

## Several agents on one box [#several-agents-on-one-box]

```bash
prized box resize mango Medium
```

Use your box's name in place of `mango`; `prized box ls` lists them. A Medium (8 vCPU, 32 GB) needs a plan. Give each agent its own git worktree and session: [Run multiple Claude Code and Codex agents in parallel](https://prized.dev/docs/parallel-agents) has the steps.

## What it costs [#what-it-costs]

A Small (4 vCPU, 16 GB) is $0.137 an hour awake, and a Medium (8 vCPU, 32 GB) $0.342; asleep, a box pays only for its disk. The $30 of free credit runs a Small for about nine days around the clock ([Billing](https://prized.dev/docs/billing#sizes-and-rates)).
