microagent clone
Last updated: 2026-08-15
microagent clone <source> <target> [--state-dir <dir>]clone copies a prepared, halted, 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.
In a terminal, a clone that takes long enough to notice reports copied bytes on stderr. Its total is the logical size of the source workspace files, and completion is reported only after the target workspace record is published. JSON and MCP responses contain no terminal progress text.
Examples
Section titled “Examples”Keep a template workspace and clone working copies from it:
microagent clone template researchmicroagent start research--state-dir matters 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, halted, 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, running, or paused,
the target already exists, or the copy fails.