Machines
A machine is an isolated sandbox where code runs: a Linux microVM under Cloud Hypervisor. Threads create machines automatically as needed, and you can also create and drive machines yourself—with or without a thread.
Every machine belongs to a project, has an owner (whoever created it or owns the thread that did), and attaches to at most one thread at a time so there is never more than one writer.
What’s kept where
Section titled “What’s kept where”| Location | Survives moving hosts? | Included in snapshots? |
|---|---|---|
Workspace (/workspace) |
Yes, across compatible hosts | Yes—rollback, fork, and restore bring it back |
| Everywhere else (e.g. tools installed on the VM disk) | No—stays on the host’s local disk across local restarts and spin-downs | No |
Commands run as root in /workspace. Put anything you want rollback to cover inside the
workspace. Certain regenerable directories like node_modules/ and target/ are excluded from
snapshots by default (Workspace settings).
Lifecycle
Section titled “Lifecycle”| State | Meaning |
|---|---|
pending, starting |
Waiting for a host, then booting |
running |
Actively holding CPU and memory on a host |
stopped |
Freed compute; keeps only its disk and latest snapshot |
failed |
Boot failed; retried automatically, or click Resume to retry now |
destroyed |
Disk deleted; files exist only in retained snapshots |
After 15 minutes with no command, terminal, or service activity (configurable by your operator), a
running machine snapshots itself and stops. The next command or terminal resumes it—possibly on a
different compatible host—showing resuming <name> on <host>… in the thread.
Create a machine
Section titled “Create a machine”In the web UI, open Machines → New machine and pick a project, name, environment, CPU/memory/disk sizing, environment variables, optional starting snapshot, and optional thread.
From the CLI:
anastroctl machine create --project <project> --name scratch \ --cpus 2 --memory 4GiB --disk 20GiB --env NODE_ENV=development| Option | Effect |
|---|---|
--nix <flake> |
Boot a Nix guest environment instead of the base image (Environments) |
--base |
Force the base Linux image, ignoring the project’s default environment |
--capability <name> |
Require a worker capability (gpu:cuda, usb:lab); repeatable |
--no-capabilities |
Clear the project’s default required capabilities |
--from <fs_id> |
Clone the workspace from an existing snapshot instead of starting empty |
--thread <thread> |
Attach the new machine to a thread |
--env KEY=VALUE |
Inject an environment variable into every command and terminal; repeatable |
A machine’s sizing and environment are fixed at creation. To resize or switch environments, create a
new machine --from its latest snapshot.
If you omit the environment or capabilities, the machine inherits the project’s defaults (Project defaults).
Specialized workers (GPU, USB)
Section titled “Specialized workers (GPU, USB)”anastroctl machine create --project training --nix github:acme/envs#cuda --capability gpu:cuda- GPU machines need a Nix guest image containing the matching drivers.
- USB passthrough assigns an entire PCI USB controller exclusively, not individual host USB device paths.
Device-backed machines cannot live-move or save VM memory across host restarts. See Dedicated worker capabilities for setup details.
Find machines
Section titled “Find machines”The Machines page lists every machine you can access with its state, host, environment, attached thread, owner, creator, last activity, and uptime, with filters for each.
anastroctl machine list --project <project-id> --state runninganastroctl machine list --unattachedanastroctl machine get <machine> # accepts ID or name; shows workspace, branch, latest snapshotRun a command
Section titled “Run a command”anastroctl machine exec <machine> "pnpm test"Commands run via bash -lc in the workspace (resuming a stopped machine first). Output streams
live, anastroctl exits with the command’s exit code, and stderr prints the fs_before and
fs_after snapshot IDs.
--no-commit: skip taking a snapshot after this command (changes roll into the next one).--idempotency-key <key>: safe retries—reusing the key returns the original result without re-running the command.
Send a signal to a running command (2 / SIGINT by default):
anastroctl machine signal <machine> 2Open a terminal
Section titled “Open a terminal”In the web UI, press ⌘J for the terminal drawer beneath the thread (or open the right panel’s
Terminal tab). Split panes side-by-side or stacked (⌘D / ⌘⇧D on macOS; Ctrl+Alt+D /
Ctrl+Alt+Shift+D elsewhere), or highlight output and click Add to chat. Drawer shells stay
alive while hidden and close when you leave the thread or stop the machine.
From the CLI (on a running machine):
anastroctl machine shell <machine>Terminals inherit the same environment variables and secrets as commands. File edits made in a terminal are snapshotted after 30 seconds of quiet and on close; if the machine is attached to a thread, those changes enter the thread log so the agent sees them and rollbacks include them.
The browser
Section titled “The browser”Every machine includes a headless Chromium you and the agent share. Open the right panel’s
Browser tab (⌘⇧J), enter a URL or local port like localhost:5173, and interact with it
normally—localhost resolves inside the machine, so dev servers running there load directly.
When an agent opens a page with browser_open, the Browser tab opens automatically and shows the
agent’s cursor as it navigates and clicks. In supervised mode, browser_evaluate (running
JavaScript in the page) asks for your approval first.
Click DevTools in the Browser toolbar to open Chrome DevTools below the page (drag the divider to resize). Multiple devices can open DevTools on the same machine at once: console output streams to all of them, breakpoints pause the page for everyone (with anyone able to step or resume), and element inspection works directly on the page view. Each device sees the breakpoints it set.
Chromium launches on first use and keeps its cookies inside the machine. Popups and new browser tabs aren’t shown yet.
Snapshots and history
Section titled “Snapshots and history”Every command that changes files creates a snapshot automatically. You can also checkpoint, browse, and restore by hand:
anastroctl machine checkpoint <machine>anastroctl machine history <machine> --limit 20 # newest first, with fs_idanastroctl machine restore <machine> <fs_id>Restoring boots the machine on a new branch from <fs_id> while preserving the old branch, so you
can restore forward again too. If attached to a thread, the restore is recorded in its log.
Inspect snapshots even while the machine is stopped:
anastroctl machine diff <from-fs_id> [<to-fs_id>] # defaults to latest snapshotanastroctl machine diff <from-fs_id> --name-status # paths only: A, D, M, Ranastroctl machine ls <fs_id> src/anastroctl machine cat <fs_id> src/auth.tsBy default, a machine keeps its last 50 snapshots and everything from the last 30 days, plus anything referenced by thread history, forks, or pins. Browse recent snapshots in the right panel’s Machine tab to view diffs or pin one, or manage pins from the CLI:
anastroctl machine pin <fs_id> --machine <machine> --note "Before dependency update"anastroctl machine pins <machine>anastroctl machine unpin <fs_id> --machine <machine>Pins protect snapshots from garbage collection and keep the machine from expiring automatically. You can also mount a workspace on your workstation.
Attach and detach
Section titled “Attach and detach”| Where | Attach | Detach |
|---|---|---|
| Thread header | Attach → pick an unattached machine | Machine chip menu → Detach from thread |
| Machines page | Pick a thread on the row | Detach |
| CLI | anastroctl machine attach <machine> --thread <thread> |
anastroctl machine detach <machine> |
A detached machine stays running until its idle timeout and can be attached to another thread. If a
machine is attached elsewhere, detach it first (or let a project owner steal it with
machine attach --force). Lifecycle actions on an attached machine are logged in its thread.
The machine chip menu also offers Show in panel, Open terminal, and Spin down / Resume.
Files and diffs
Section titled “Files and diffs”- Files tab: browse or search the workspace (
⌘Pto open a file,⌘⇧Fto search contents) with rendered previews for Markdown, CSV, HTML, images, and PDFs. Edit text files in place and save with⌘Sto write to the running machine and snapshot immediately. If the file changed on disk since you opened it, Anastro asks whether to Overwrite or Reload. - Diff tab: compare a turn’s changes or any two snapshots. Click + in the gutter on any lines to quote and comment on them directly in your composer draft.
Installing packages
Section titled “Installing packages”On Linux workers, installs from npm, PyPI, Cargo, Go, RubyGems, and Maven Central pass through the cluster’s package firewall automatically:
- Versions flagged as malware by OSV are hidden from package listings, and
direct downloads fail with
403naming the advisory. - Brand-new releases (published within the last 24 hours by default) are held back so they appear missing until the cooldown passes.
- Everything uses the normal registry hostnames with no proxy configuration.
- Blocked requests show up under Package firewall in the machine’s right-panel tab.
The firewall is cluster-wide and can’t be bypassed per machine. If you run a Docker build inside a
machine, mount /etc/ssl/certs/ca-certificates.crt into the container so it trusts the machine’s
registry CA.
Spin down, resume, move, or destroy
Section titled “Spin down, resume, move, or destroy”anastroctl machine spin-down <machine> # snapshot and stop; resumes on next useanastroctl machine resume <machine>anastroctl machine move <machine> [<host>]anastroctl machine delete <machine> # deletes disk; files remain only in kept snapshotsA live move migrates a compatible Linux machine’s memory, disk, and workspace to another host
in a brief pause (omit <host> to let the scheduler pick one). Pass --graceful to checkpoint,
stop, and cold-boot on the target host instead—this moves the workspace, while the old host keeps
the machine’s private disk. Spin down, resume, and destroy are available in the UI too.
Keep a machine after archive
Section titled “Keep a machine after archive”When you archive a thread, its machines stop and detach. Machines that the thread created are
scheduled for deletion after 7 days by default ([machines] destroy_after_archive). Directly
created machines aren’t affected.
A machine won’t be deleted if you mark it to keep, pin any of its snapshots, attach it to another thread, unarchive its thread, or have an interrupted workspace upload waiting to recover. Project editors can toggle Keep after archive on the Machines page, or run:
anastroctl machine keep <machine>anastroctl machine keep <machine> --retained falseTurning retention off makes the machine eligible for normal cleanup again; it doesn’t delete it on the spot.
- Environments: customize what’s preinstalled and configure
.dwfs.toml. - Secrets and GitHub: connect project secrets and repos.