# Machines

> Run agents on an always-on machine at a flat monthly price, instead of a sandbox each.

> [!NOTE]
> Before an account's first machine, NoClick vets the company (see [Network and the usage policy](https://www.noclick.com/docs/guide/machines.md#network-and-the-usage-policy)). Until it's asked for, `Machine.create` raises `noclick.ActionRequired` before anything else is judged, `max_monthly_usd` included; while it's being reviewed, a machine you create is held (`awaiting_approval`) and starts once it's approved. `Machine.sizes()`, `Machine.list()` and the vetting itself work from the start.

A **machine** is an always-on computer of a fixed size in one [region](https://www.noclick.com/docs/guide/regions.md), billed a flat monthly price. Agents you put on it run their harness there instead of in a [sandbox](https://www.noclick.com/docs/guide/sandboxes.md) of their own: nothing is shut down when they go quiet, and there's no per-minute sandbox charge.

## Start one

```python
import noclick

box = noclick.Machine.from_name(
    "support-box",
    create_if_missing=True,
    size="medium",
    region="eu",
    max_monthly_usd=120,
)
print(box.status, box.monthly_usd)   # provisioning 62.4
```

```ts
import { Machine } from "noclick";

const box = await Machine.fromName("support-box", {
  createIfMissing: true,
  size: "medium",
  region: "eu",
  maxMonthlyUsd: 120,
}).hydrate();
console.log(box.status, box.monthlyUsd);   // provisioning 62.4
```

`max_monthly_usd` is required: once the company is vetted, a size that costs more raises `noclick.PriceExceeded` and nothing starts. `region` is fixed for the machine's life; without it the machine takes your account's default region, else `us-east`. `from_name` also sets the `size`, `volumes`, `network` and `max_monthly_usd` you pass every time it runs, so a different one later changes the machine (a new size restarts it, and is judged against the `max_monthly_usd` set with it). A machine in another `region` or on another `host` raises `noclick.Conflict`.

### Sizes and hosts

Machines run on **DigitalOcean** in every region, `in` (India, Bangalore) included:

| `size=` | vCPUs | Memory | Disk | Per month | Conversations working at once |
| --- | --- | --- | --- | --- | --- |
| `small` | 2 | 4 GB | 80 GB | $31.20 | 2 |
| `medium` | 4 | 8 GB | 160 GB | $62.40 | 4 |
| `large` | 8 | 16 GB | 320 GB | $124.80 | 8 |

In `eu`, a machine goes on **Hetzner** where it's available: a cheaper host with a smaller disk at the same size, and an `xlarge` size (16 vCPUs, 32 GB) that only Hetzner sells, so only in `eu`. A vCPU is a hardware thread, as every host sells them. The price is what the host charges NoClick, nothing added: the machine, its disk, a public IPv4 address where the host bills one, and its daily backups.

`noclick.Machine.sizes()` lists what's worth buying now, size first: each size once, at its cheapest anywhere, with the `region` and `host` that price is from and its `disk_gb` and `monthly_usd` there (at one price, your account's default region comes first). `regions` lists every region it can be bought in now, cheapest first, each with its host, disk and price, and `hosts` each host that runs it. Sizes that can't be bought now are left out, and so is a size when another that can be bought has at least its vCPUs and memory for the same price or less, since the bigger one is the better buy (a larger disk alone doesn't keep the dearer one). `Machine.sizes(region="eu")` lists them as bought in that region instead, judged there; `include_dominated=True` lists every size, each with `available` and `dominated_by` (the size that beats it). Stock is read at most a minute before; `create` checks again, and a `create` that finds the host out of stock has the next listing read that host afresh.

```python
size = noclick.Machine.sizes()[0]
print(size.name, size.region, size.host, size.monthly_usd)   # small eu hetzner 8.39
for where in size.regions:
    print(where.region, where.host, where.monthly_usd)
box = noclick.Machine.create("support-box", size=size.name, region=size.region, host=size.host,
                             max_monthly_usd=size.monthly_usd)
```

```ts
import { Machine } from "noclick";

const [size] = await Machine.sizes();
console.log(size.name, size.region, size.host, size.monthlyUsd);   // small eu hetzner 8.39
for (const where of size.regions) console.log(where.region, where.host, where.monthlyUsd);
const box = await Machine.create("support-box", {
  size: size.name, region: size.region!, host: size.host!, maxMonthlyUsd: size.monthlyUsd,
});
```

That buys exactly what it shows: if that host has run out since, `create` raises `noclick.NotAvailable` or `noclick.PriceExceeded` (naming another host that has one, and its price, where there is one) and nothing is charged.

A new machine goes on the cheapest host that runs its size in its region and has one in stock, and on DigitalOcean when the cheaper host has none. It's never placed on a host that costs more than `max_monthly_usd`: when only a dearer host has stock, `create` raises `noclick.PriceExceeded` naming that `host` and its `monthly_usd`, and you choose. `host="hetzner"` or `host="digitalocean"` puts it on that host only. The machine's `host` says where it landed, and `monthly_usd` is that host's price. A machine stays on its host for its life: its resizes, restarts and rebuilds are there.

Bought through a quote (an agent connected over MCP), the quote names the host that will place it and its price, and the purchase places it there or is refused (`noclick.NotAvailable` or `noclick.PriceExceeded`, naming where it could go instead): what you're charged is what was quoted. To take the other host, quote it again with its `host`.

A machine is `provisioning` until it's ready (about three minutes), then `running`. `status_reason` says why one is `stopped` or `failed`.

## Put agents on it

```python
claude = noclick.Connection.from_name("claude", integration="anthropic", create_if_missing=True)
support = noclick.Agent.from_name(
    "support",
    create_if_missing=True,
    instructions="You answer support tickets from our docs and the customer's account.",
    harness="claude_code",
    model_connection=claude,
    machine=box,
)
print([agent.name for agent in box.agents()])   # ['support']
```

```ts
import { Agent, Connection } from "noclick";

const claude = Connection.fromName("claude", { integration: "anthropic", createIfMissing: true });
const support = Agent.fromName("support", {
  createIfMissing: true,
  instructions: "You answer support tickets from our docs and the customer's account.",
  harness: "claude_code",
  modelConnection: claude,
  machine: box,
});
// Not in the TypeScript client: agents() as Agents. It gives their fields.
console.log((await box.agents()).map((agent) => agent.name));   // ['support']
```

An agent on a coding harness runs whole on the machine. An `sdk` agent's shell doesn't run on a machine yet: `machine=` with one raises `noclick.NotAvailable`. Many agents share one machine (at most 50), and each agent gets a container of its own on it, so agents never see each other's files. An agent's `setup` runs in its container as root as the container starts, as in a sandbox, with its secrets in the environment: what it installs and the files it writes stay in that container, never on the machine or in another agent's. A container keeps running between turns, so setup runs once per container, not per turn; a changed `setup` starts a new one at the next turn. A machine whose NoClick agent predates this refuses a turn of an agent with `setup`, saying so, until it updates itself once its agents are idle. An agent on a machine runs in the machine's region: a different `region` raises `noclick.InvalidRequest`, and an agent whose region is set moves only onto a machine in it. An agent can use its own user's machines and the account's.

`agent.update(machine=None)` moves an agent back to a sandbox of its own, and `machine=other` to another machine. It moves between turns and keeps its files.

### Share it with a space

Share one of your account's machines with a [workspace](https://www.noclick.com/docs/guide/workspaces.md) for its agents to run on, and its people know where:

```python
team = noclick.Workspace.from_name("Team")
team.share("machine", box, members_level="use")
```

```ts
import { Workspace } from "noclick";

const team = Workspace.fromName("Team");
await team.share("machine", box, { membersLevel: "use" });
```

At `run` (members get it by default; guests get `none`), the workspace's agents run there and its people see it, with the workspace's agents on it, in `team.summary()["kinds"]["machines"]["shared"]`; you place them, as does the workspace's own NoClick on your word, and that NoClick places agents only on machines shared with its workspace. At `use` its people may also move the workspace's agents onto it and off it (`agent.update(machine=...)`, the agent's machine and nothing else of it), when both machines are shared with them in a workspace the agent is in. A share is for agents to run on, never the box: its shell, commands and files stay yours at any level.

## Your keys stay off it

The machine never holds your connections' or model keys. A coding harness on it calls its model through NoClick's credential proxy with temporary credentials, which make the calls with the real key and are revoked when the conversation's container stops, and its tools reach your connections through NoClick, under your [policy](https://www.noclick.com/docs/guide/policy.md), exactly as in a sandbox. So a coding agent on a machine needs a model connection holding NoClick's own key or a Claude, ChatGPT or OpenRouter key, or your own plan.

Your own Claude or ChatGPT plan runs on a machine you added or rent, on the harness it serves (a Claude plan on `claude_code`, a ChatGPT plan on `codex`). Its sign-in is kept as a sandbox keeps it: a private file in that agent's own container, never on the machine itself or in another agent's container, so no other agent there changes plan. The harness renews the sign-in itself from that container, as it does on your laptop, and NoClick keeps every container on the plan on its current sign-in, so none of them ever spends a renewal another already used. Placing the agent there says so in the answer's `notes`. A plan that isn't yours (a user's, or a person's in a space) stays off your machines, where you have root, and `machine=` with one raises `noclick.NotAvailable`. A machine whose NoClick agent is too old to hold a sign-in refuses the turn until it updates itself, which it does once its agents are idle. Switching the agent's model connection starts its container again on the new one at its next turn. Reconnecting its plan reaches it at its next turn too: Claude Code takes the new sign-in where it runs, and Codex starts its container again.

## The machine itself

```python
print(box.exec("df -h /").stdout)
box.files.write("notes.md", "Restart the worker after deploys.")
dashboard = box.expose(8080)          # private: asks for an API key
print(dashboard.url)
box.exec("tar czf /home/noclick/backup.tgz /home/noclick/app", background=True, timeout_s=1800).wait()
```

```ts
console.log((await box.exec("df -h /")).stdout);
await box.files.write("notes.md", "Restart the worker after deploys.");
const dashboard = await box.expose(8080);   // private: asks for an API key
console.log(dashboard.url);
await (await box.exec("tar czf /home/noclick/backup.tgz /home/noclick/app", { background: true, timeoutS: 1800 })).wait();
```

`exec` and `files` reach the machine itself, not a conversation's container. They act as the machine's user, `noclick`, in `/home/noclick` (a relative path is under it); it has no administrator rights, so install what your agents need in their own containers, through their `setup`. `files.list(path)` lists a folder's files and folders by name, starting from `/home/noclick`, each with its `type`, `size` and `updated_at`.

### A shell

`box.shell()` opens a shell (`bash -l`) on the machine as the same user, for the account's owner: it returns a websocket `url` and a single-use `token`, good for two minutes, to hand to a browser terminal such as xterm.js. The socket's first message is `{"type": "auth", "token": ..., "cols": ..., "rows": ...}`; then binary messages carry what you type and what it prints, and a text `{"type": "resize", "cols", "rows"}` sizes it. It closes once bash exits, or after 15 minutes with nothing typed (`idle_limit_s`), and as soon as its key is revoked or expires (4401) or the machine is deleted (4404). A client that says it renews (`"renew": true` in its first message) lasts 15 minutes at a time: in the minute before, it sends `{"type": "renew"}`; answer `{"type": "renew", "token"}` with a new `shell()` token and bash goes on, or it closes with code 4000. One that doesn't say so has no such limit. `noclick machines ssh` and Resources, Machines renew for you; Resources, Machines opens one on a machine's page.

From your own terminal, the CLI opens the same shell, with no SSH keys and no SSH server:

```bash
noclick machines ssh support-box
```

A machine's page shows what `Machine` reads: `spent_usd_this_month`, `started_at` (when it last booted, so how long it's been up), `working_count` and `agent_states` (which of its agents are working now), `health` (its load, memory and disk at its last check-in, while it runs) and, while it's `updating`, `pending` (the size it becomes and whether that moves it to a new host).

`expose(port)` serves a port at an HTTPS URL on NoClick's domain. A private port asks for an API key with the `machines` scope (`Authorization: Bearer`), which NoClick checks and removes before the request reaches your app; `public=True` answers anyone, for a webhook receiver your agents run. `close_port(port)` stops serving it. A machine serves at most 10 ports.

## Files and volumes

A conversation's files (its `/workspace` and its harness's session) live on the machine's disk and are saved at the end of every turn, before its reply reaches you, so a conversation survives anything that happens to the machine and moves to a sandbox or another machine with its files. A single file over 32 MB stays on the machine and isn't saved: keep large outputs in a [bucket](https://www.noclick.com/docs/guide/storage.md). On [your own server](https://www.noclick.com/docs/guide/machines.md#your-own-server) the `/workspace` stays on its disk instead, unless you choose `workspaces="saved"`.

The machine's own files, the ones you write with `exec` and `files`, are kept across restarts. NoClick backs up the machine's disk every day; after a hardware failure the machine is rebuilt on a new host from its last backup (a `machine.restored` event), so files written on the machine itself since then are lost. Keep what matters in a [volume](https://www.noclick.com/docs/guide/volumes.md) or a [bucket](https://www.noclick.com/docs/guide/storage.md).

`volumes={"/shared": vol}` attaches volumes for the machine and every agent on it. An agent sees a volume as it was when its turn started and saves its writes when the turn ends, as an agent's sandbox does. The machine's own copy at that path, owned by its user, is loaded when the machine starts and saved every five minutes and before it restarts or moves. Volumes outlive the machine, and a volume mounted on a machine can't be deleted (`noclick.Conflict`).

## Restarts and updates

NoClick manages the machine's image, with the harnesses at the versions NoClick runs (`image` names it), and updates it: an update waits for running turns, then replaces each agent's container between turns. If the machine stops answering, NoClick restarts it; `restarts` counts these, turns it interrupts fail as interrupted (never replayed), and a `machine.restarted` event follows. One that stops answering again soon after, or doesn't come back, is rebuilt on a new host from its last backup (a `machine.restored` event, with the backup's time in `restored_from`). One that stops answering again after that is `failed` (a `machine.failed` event), and `box.restart()` tries again.

`box.restart()` restarts it now (an operation that finishes once it runs again). `box.stop()` powers it off, so its agents take no turns (a message raises `noclick.NotAvailable`) until `box.start()`.

`box.update(size="large")` moves it to a larger size once running turns end (`updating`, a few minutes); the new price, its host's for that size, applies from the next day. A size its host doesn't sell (`xlarge` on DigitalOcean) is refused: make a new machine for it. On DigitalOcean the disk grows with the size. On Hetzner it keeps the disk it has (`disk_gb` says so), which keeps a later move back down quick: a size whose disk holds the machine's is resized in place. A size with a smaller disk than the machine's moves it to a new host on the same host vendor, since no host shrinks a disk in place: the machine's user's home (`/home/noclick`) is copied over and each conversation loads its files from where they're saved, a longer restart. The machine must be running and what's on its disk must fit the smaller one; if the move fails, the machine comes back on its old host at its old size.

## Network and the usage policy

Machines follow their host's rules as well as NoClick's: Hetzner forbids mining, scanning other networks or addresses and faking source addresses, and both hosts forbid attacks such as DDoS and open mail relays. A breach can get every machine on that host account suspended, so NoClick runs customers' machines in host accounts of their own, apart from its own infrastructure.

Machines follow NoClick's [machines usage policy](https://www.noclick.com/legal/acceptable-use#3-sandboxes-machines-and-other-compute), section 3 of the Acceptable Use Policy: no cryptocurrency mining, network scanning or bulk email, whatever runs on them. Mail ports, known mining pools, other machines' private addresses and the host's metadata service are blocked for everything on a machine. `network` is what the machine's own commands may reach: `True` (the default) is anywhere else, and a list of hosts limits them further, like an agent's [network](https://www.noclick.com/docs/guide/agents.md): HTTPS to those hosts (`"*.github.com"` covers its subdomains) and name lookups, nothing else. Each conversation's container keeps to its agent's own `network` the same way.

Before an account's first machine, NoClick vets the company: the account's owner asks for machines in the [developer console](https://www.noclick.com/dashboard/developers/resources/machines) (Resources, Machines) with the company's name, website, country and what its machines will run, and accepts the usage policy. The same page shows where the request stands. Your own server may ask instead, with one of your account's keys that names the `machines:vetting` scope (a key with `*` doesn't hold it unless it's named too): `POST /v1/machines/vetting` with the same details, `accept_usage_policy: true`, and who accepted the policy and when (`accepted_by: {name, email}`, `accepted_at`), as your own sign-up flow recorded them; the request keeps them (`GET /v1/machines/vetting` reads `accepted_by`, `accepted_at` and `submitted_by`). Signed in, the owner is recorded as accepting it, now. An agent connected through MCP never asks. Before it's asked for, creating a machine raises `noclick.ActionRequired`, whose `next_step` links that page. While NoClick reviews it, a machine you create is held: its `status` is `awaiting_approval`, nothing is made for it and nothing is charged, and it starts (`provisioning`, then `running`) the moment the company is approved. If it's declined, held machines are deleted without a charge and their agents go back to sandboxes; the decision says why, and you can ask again. You hear the decision by email and where you last talked to NoClick, and it's a `machine.vetting.decided` [event](https://www.noclick.com/docs/guide/webhooks.md).

## Where it runs

A machine runs in its region and its disk stays there. What NoClick keeps about it, such as its agents' conversation history, stays in NoClick's database in `us-east`.

## What it costs

A machine is charged a thirtieth of its monthly price for each day it's held, from the day it first runs until the day you delete it, running or stopped (one that fails to come up isn't charged). An agent on it pays no sandbox time; its model tokens are billed as they would be anywhere. Machines show as their own line in [usage](https://www.noclick.com/docs/guide/spend.md).

If your balance can't pay a day, the day stays owed and you're told (a `machine.unpaid` event and an email). The machine keeps running for 48 hours, then stops (`status_reason` is `"unpaid"`) with its disk kept; unpaid for 14 days, it's deleted and its agents move back to sandboxes. Owed days are charged as soon as your balance covers them, and `box.start()` charges them first.

A coding agent's sandbox is billed about $0.24 for each hour it's up (about $0.42 pinned to `us-east` or `us-west`), so one agent that never goes quiet costs about $175 a month in sandbox time. A `small` machine at $31.20 pays for itself once your agents keep sandboxes up for more than about 130 hours a month, a little over four hours a day, and sooner on a cheaper host where one is available. Agents that answer a few messages a day are cheaper on sandboxes; agents that work most of the day belong on a machine.

## Sizing

A coding agent's conversation needs about a vCPU and 1.5 to 2 GB while it works and almost nothing while it waits. Size for the conversations that work at the same moment, not for how many there are: past what the size holds at once, a turn waits in `queued` for one to finish rather than failing. A machine runs at most 50 agents. Builds that need more memory (`npm install`, `tsc` on a large project) want a larger size.

## Your own server

A Linux server you run can be a machine too: a VPS, a box at home, a Windows PC through WSL 2 or a Mac, on x86-64 or ARM64 with Ubuntu or Debian. It's free (your agents' model calls are at cost, as anywhere), needs no vetting, and NoClick runs your agents there in containers sandboxed by gVisor, and nothing else.

```python
home = noclick.Machine.add_own()
print(home.pairing.command)
```

```ts
import { Machine } from "noclick";

const home = await Machine.addOwn();
console.log(home.pairing?.command);
```

Run the command on the server as root within 30 minutes (the code in it works once). Adding again before a server pairs returns the same machine, with its code while the code is good and a new one once it expired, so add one server at a time. Until agents run on machines where you are, `add_own` raises `noclick.NotAvailable` and `Machine.agents_enabled_here()` is `False`.

```bash
curl -fsSL https://api.noclick.com/machine-agent/v1/machine.sh | sudo sh -s -- --code nc_mach_...
```

NoClick checks the server before the installer runs, and the installer checks it again before changing anything. A server turned away (another system, too small, an expired code, or one of the installer's own reasons) says why on its terminal, and the machine's `pairing.refused` says the same where you added it, until a new code or a server that pairs. The installer pairs the server before changing anything, says what it will set up and asks: Docker (it uses yours if it's version 24 or newer), gVisor as one of Docker's runtimes (added without restarting Docker where it can; otherwise it asks before a restart), a `noclick` user, a Docker network and firewall chains of its own, and NoClick's agent, the `noclick-machined` service. That agent opens no port: it calls NoClick, so a server behind a home router needs nothing. The machine takes the server's hostname unless you named it, and is `provisioning` until the server answers, then `running`; `home.new_pairing_code()` replaces a code that expired.

To install unattended (over SSH without a terminal, from cloud-init or a script), run `pairing.commands["linux_unattended"]`, or `"mac_unattended"` on a Mac: the same command with `--yes`, which goes ahead without asking. The plain command never does: with no terminal to ask on, it stops before changing anything and names the `--yes` command to run instead.

```bash
curl -fsSL https://api.noclick.com/machine-agent/v1/machine.sh | sudo sh -s -- --code nc_mach_... --yes
```

**On Windows**, add it from a Linux distro in WSL 2: `wsl --install -d Ubuntu-24.04` in PowerShell, then run the command in Ubuntu. Its systemd must be on, as it is in Ubuntu's WSL images (else add `[boot]` and `systemd=true` to `/etc/wsl.conf` and run `wsl --terminate Ubuntu-24.04`). WSL stops a distro no window uses, so the installer also adds a Windows task, `NoClick machine`, that keeps it running from when you sign in: the machine is online while you're signed in to Windows and the PC is awake. WSL's distros share one network, so a PC is one machine: if another distro already runs Docker Engine, run the command in that one and NoClick uses its Docker. Docker Desktop's WSL integration won't do, since its engine runs where NoClick can't add gVisor or its firewall: turn the integration off for the distro first.

**On a Mac** with Apple silicon (macOS 13 or later), run `pairing.commands["mac"]` in Terminal: the same command without `sudo`, since the VM it sets up is yours, not root's. NoClick runs a Linux VM of its own there, through Lima on Apple's Virtualization framework, and sets up the machine inside it. The VM is made with the machine's `agent_share` of the Mac's CPUs and memory (leaving macOS at least a CPU and 2 GB), or `--cpus` and `--memory-gb` after the code for another size (at least 2 CPUs and 4 GB), and all of it is its agents'. A VM keeps its size, so `agent_share_fixed` is true once it's made: to change it, uninstall NoClick on the Mac and add it again. Everything it adds is in `~/Library/Application Support/NoClick`, and a LaunchAgent starts the VM when you sign in: the machine is online while you're signed in and the Mac is awake. Setting up shows each step as it goes (Docker and gVisor are large downloads), and if it's cut short (the terminal closed, a sign-out), it finishes after you next sign in. The VM reaches nothing of the Mac but that folder, and nothing on your network. `~/Library/Application Support/NoClick/bin/noclick-machine uninstall` removes it all.

What's different from a machine NoClick runs:

- **Its size is the server's.** `cpu`, `memory_gb`, `disk_gb` and `os` are what the server reports. Its agents use `agent_share` of it and the rest stays yours: three quarters by default, `add_own(agent_share=1)` for a server just for NoClick, less on a computer you use. Each conversation's container may use the whole share, as a program on your own computer would, and the containers share it; a working conversation needs about a vCPU and 1.5 GB. One more starts working only while the server has room for it now (1.5 GB of memory free and its load under its agents' CPUs, read as the turn comes); otherwise its turn waits, first come, first served, and goes on as room frees. A share that leaves too little for one conversation is refused, saying what would do. `update(agent_share=0.5)` reaches the server within seconds: running conversations keep going, and each one's container takes its new size at its next start. `update(max_conversations=2)` caps how many work at once, however much room there is, each still able to use the whole share.
- **Your shell and files as on any machine, its agents in containers only.** `shell()` and `files` work as on a machine NoClick runs, for the same people: as the server's `noclick` user (no administrator rights), in `/home/noclick`; on a Mac, in NoClick's VM. With no tunnel to come in through, the server's agent dials the shell to NoClick when you open one, so nothing on the server listens for it. `exec`, `expose`, `restart`, `stop` and `start` raise `noclick.NotAvailable`, and the server's agent refuses other commands on the server itself too. Containers reach nothing on your network: private addresses are blocked, as on every machine, even where a name resolves to one. They look names up through the server's own resolvers (a VPN's or a company's DNS included). An agent asked where it runs sees its container's name and gVisor's kernel, never your server's hostname or kernel.
- **Offline, not restarted.** A server that stops answering for 90 seconds is `offline` (a `machine.offline` event; `last_seen_at` says since when): its agents' turns raise `noclick.NotAvailable` naming it until it's back (`machine.online`). NoClick never restarts it or moves its agents.
- **The account's own.** Root on the server can read the temporary keys its agents' containers hold, so only the account adds one, and only the account's own agents run there, never a user's.
- **Running apps and test databases, as you choose.** `app_testing` is the machine's say on whether its agents run your app and its tests against a real database: `"ask_first"` (the default: an agent asks you in the chat before it does), `"by_itself"` or `"never"`. An agent on the machine gets the stricter of this and its own [`app_testing`](https://www.noclick.com/docs/guide/agents.md#app-testing-a-bigger-computer-when-a-task-needs-one), and Allow from now on in the chat stops whichever was asking. Any choice but `"never"` gives each conversation's container its own Docker (so `docker`, `docker compose` and testcontainers work there, and the machine's `docker` reads true), from its next start; running ones keep going. `add_own(docker=True)` alone is `"by_itself"`, and `docker=False` is `"never"`. Each container runs its own dockerd inside its own gVisor sandbox: it never reaches the server's Docker, nothing runs privileged on the server, and what it builds and pulls stays in its container's memory, so give it room (a larger `agent_share`). The first container with Docker adds a second gVisor runtime, `runsc-docker`, to Docker's `daemon.json` and reloads Docker, which keeps running containers. Docker's networking needs raw sockets inside the container's sandbox, so a container could send packets as another on the server's container network: a container whose agent's `network` is limited never gets Docker, which keeps its limit whole. A machine added before app testing keeps Docker as it had it: on as `"by_itself"`, off as `"never"`.
- **Work stays on its disk.** `workspaces` is where each conversation's `/workspace` lives: `"local"` (the default) keeps it on the server's disk alone, across the conversation's containers, and never saves it, so a turn ends as soon as its reply is written, however large the checkout. A conversation that starts on another machine or a sandbox, or whose agent you move off the server, starts with an empty workspace, and says so in the chat. `update(workspaces="saved")` saves it into the conversation's volume after every turn instead, as on a machine NoClick runs; the copy on the server is saved whole at the next turn's end. The harness's session (the conversation's thread) is saved after every turn either way. Each repository an agent checks out has one copy on the server, which every conversation's checkout borrows from (`git clone --reference`), so a new conversation's clone takes seconds; NoClick brings that copy up to date before each new checkout, with the checkout's own sign-in, and nothing in a container can write it. The package managers' caches (npm, pnpm, Yarn, Corepack, pip and uv) are shared by every conversation on the server and never saved, so a second install reuses the first's downloads. The machine's `volumes` are mounted read-only into its conversations, brought up to date before each turn, rather than copied into each one: an agent that writes a volume mounts it itself ([its own `volumes`](https://www.noclick.com/docs/guide/volumes.md)).

`delete()` removes it from NoClick, and the server uninstalls NoClick itself the next time it answers. `sudo noclick-machine uninstall` on the server does the same from there. Either way the harness images NoClick pulled go too, and Docker and gVisor stay.

## Remove it

```python
box.delete()
```

```ts
await box.delete();
```

Deleting a machine moves the agents on it back to their own cloud sandboxes first, each from its next turn. It stops the charge that day and removes its disk; its volumes stay.
