---
title: "Get Worktree Endpoint"
method: GET
path: "/api/v1/worktrees/{worktree_id}"
tags: ["worktrees"]
---

# Get Worktree Endpoint

`GET /api/v1/worktrees/{worktree_id}`

Get a worktree by ID.

## Path parameters

- `worktree_id` string, required

## Response `200`

Successful Response

- WorktreeDescriptor — 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 — Machine path information associated with a LOCAL worktree.
    - `id` string, required
    - `machine_id` string, required
    - `local_path` string, required
  - `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

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/omnara/apis/omnara-api.md) · [All operations](https://skmtc.dev/omnara/apis/omnara-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/omnara/omnara-api/revisions/624048e40cad/schema)
