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:
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.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Request to migrate a worktree to a different machine type.
Target type: LOCAL (user machine) or REMOTE (sandbox)
LOCAL, REMOTE 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)
checkpoint, base_ref Name for new worktree when using source='base_ref'. If provided, creates a new worktree with this name instead of migrating existing one.