worktrees

Set User Session Worktree

Set the worktree for a user session.

patch/api/v1/worktrees/session/{session_id}

Request

  • Base URL
    https://docs.omnara.com (the document declares no server; this is the origin it was published from)
  • Auth
    HTTP bearer

Path parameters

session_id, string required

Request body

WorktreeSetRequest required

Request to set a user session's worktree.

worktree_id, string required

Worktree ID to associate with session

Response

Successful Response

WorktreeDescriptor required

Serialized worktree entity returned to API clients.

id, string required

Unique worktree identifier

workspace_id, string required

Parent workspace identifier

name, string nullable

Worktree name (null for the main worktree)

is_main, boolean required

Whether this is the main/default worktree for the workspace

path, string nullable

Filesystem path for the worktree on the machine

worktree_type, 'LOCAL' | 'REMOTE' nullable

Type of worktree: LOCAL (user machine) or REMOTE (sandbox)

user_machine_path, SharedSchemasWorktreeUserMachinePathDescriptor nullable

Machine path information associated with a LOCAL worktree.

managed_machine_id, string nullable

Managed machine ID if worktree_type is REMOTE

last_heartbeat_at, string date-time nullable

Most recent liveness heartbeat received from the sandbox container (REMOTE only).

last_synced_checkpoint_id, string nullable

ID of the last checkpoint that was successfully synced to cloud storage. This may differ from current_checkpoint_id if a recent checkpoint failed to sync.

checkpoint_restore_pending, boolean

Whether a checkpoint needs to be restored on next local session start

current_checkpoint_id, string nullable

Identifier of the current checkpoint for this worktree

checkpoint_metadata, object nullable

Metadata associated with the current checkpoint (e.g., commit info)

created_at, string date-time required

Timestamp when the worktree was created

updated_at, string date-time required

Timestamp when the worktree was last updated

Changes

No recorded changes to this operation across all 1 revision of this API.