Migrate Worktree
Migrate a worktree to a different machine type (LOCAL or REMOTE).
For LOCAL: Requires target_machine_id pointing to a user's machine. For REMOTE: Creates a managed machine (sandbox), provisions the workspace, and starts sessions in the sandbox.
The migration process:
- Stops any running sessions on the current machine (if migrating from local)
- Updates the worktree's machine association
- For REMOTE: Provisions sandbox workspace and starts sessions in background
Special case: When source='base_ref' and worktree_name is provided, creates a new worktree with that name as REMOTE from base_ref, ignoring the worktree_id.
Request
- Base URLhttps://docs.omnara.com (the document declares no server; this is the origin it was published from)
- AuthHTTP bearer
Path parameters
Request body
Request to migrate a worktree to a different machine type.
Target type: LOCAL (user machine) or REMOTE (sandbox)
Target user machine ID (required for LOCAL, ignored for REMOTE)
Source for REMOTE migration: 'checkpoint' uses current checkpoint, 'base_ref' starts fresh from workspace base ref (requires sync enabled)
Name for new worktree when using source='base_ref'. If provided, creates a new worktree with this name instead of migrating existing one.
Response
Successful Response
Response after migrating a worktree.
Updated worktree descriptor
Status of the migration: 'migrated' on success
Changes
No recorded changes to this operation across all 1 revision of this API.