microagent clone
Last updated: 2026-06-14
microagent clone <source> <target> [--state-dir <dir>]clone copies a prepared or stopped workspace into a new workspace record. The
target gets its own rootfs and workspace-owned disks. Runtime process state is
not copied - for a running-state fork, see
create --from-snapshot.
Examples
Section titled “Examples”Keep a template workspace and clone working copies from it:
microagent clone template researchmicroagent start researchYou’ll rarely need flags here - --state-dir only when the workspaces live
outside the default ~/.microagent/.
| Flag | Description |
|---|---|
--state-dir <dir> | State directory holding the workspace records (default ~/.microagent/) |
clone operates on offline disks; it takes no backend or supervisor selection.
Semantics
Section titled “Semantics”- The source must be prepared or stopped.
- The target workspace must not already exist.
- Files under
workspaces/<source>/are copied. - Disk paths inside the source workspace directory are rewritten to the target workspace directory.
- External disk paths are left unchanged.
Exit status
Section titled “Exit status”clone exits 0 on success; nonzero when the source is missing or running,
the target already exists, or the copy fails. In AX mode a failure is written
as a structured error envelope.