Skip to content

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.

Keep a template workspace and clone working copies from it:

Terminal window
microagent clone template research
microagent start research

You’ll rarely need flags here - --state-dir only when the workspaces live outside the default ~/.microagent/.

FlagDescription
--state-dir <dir>State directory holding the workspace records (default ~/.microagent/)

clone operates on offline disks; it takes no backend or supervisor selection.

  • 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.

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.

  • create - build a workspace from an image
  • start - boot the clone
  • list - list source and target side by side