---
title: "Restore the currently authorized compute session binding and workspace capsule"
method: POST
path: "/api/v1/agent/persistent/compute/restore"
tags: ["agent", "Persistent agents"]
---

# Restore the currently authorized compute session binding and workspace capsule

`POST /api/v1/agent/persistent/compute/restore`

## Request

- Base URL: `https://composal.com` (the document declares no server; this is the origin it was published from)
- URL: `https://composal.com/api/v1/agent/persistent/compute/restore`
- Auth: HTTP bearer

Private Activity/executor data only. Current Rails/Git authority is required; never put credentials, snapshots or results into Temporal Workflow payloads or heartbeats.

## Request body

- object
  - `scope` PersistentAgentWorkerScope, required
    - `task_id` string, required
    - `segment_id` string, required
    - `generation` integer, required
    - `claim_id` string, required

## Response `200`

Validated private exchange

- PersistentAgentComputeSessionRestore
  - `schema` 2, required
  - `scope` PersistentAgentWorkerScope, required
    - `task_id` string, required
    - `segment_id` string, required
    - `generation` integer, required
    - `claim_id` string, required
  - `plan_id` string, required
  - `machine_name` string, required
  - `region` string, required
  - `provider_workspace` string, required
  - `compute_expires_at` string, date-time, required
  - `seed_digest` string, required
  - `memory_mb` 2048 | 4096 | 8192, required
  - `spec` PersistentAgentWorkspaceSpec, required
    - `task_id` string, required
    - `configuration_commit` string, required
    - `image` string, required: Explicit nonmoving provider image version; the trusted runtime independently verifies the applied image.
    - `setup_digest` string, required
    - `durable_paths` string[], required: Sorted relative regular-file paths; no overlaps, credentials or reserved paths.
  - `snapshot` PersistentAgentWorkspaceSnapshot, required: Bounded portable snapshot: exact declared file order, at most 512 KiB decoded total and 1 MiB canonical JSON. No image/runtime authority or provider allocation is stored.
    - `schema` 1, required
    - `spec` PersistentAgentWorkspaceSpec, required
      - `task_id` string, required
      - `configuration_commit` string, required
      - `image` string, required: Explicit nonmoving provider image version; the trusted runtime independently verifies the applied image.
      - `setup_digest` string, required
      - `durable_paths` string[], required: Sorted relative regular-file paths; no overlaps, credentials or reserved paths.
    - `files` PersistentAgentWorkspaceFile[], required
      - `path` string, required
      - `mode` 384 | 448, required
      - `size` integer, required
      - `sha256` string, required
      - `content` string, required: Canonical strict base64; decoded bytes must match size and sha256.
  - `sequence` integer, required
  - `version` string, required

## Other responses

- `401`: Credential unavailable or revoked
- `403`: Current authority unavailable
- `404`: Task unavailable
- `409`: Reconciliation required
- `422`: Invalid request
- `502`: Bad gateway
- `503`: Canonical state temporarily unavailable

---

[API](https://skmtc.dev/composal/apis/vex-api.md) - [All operations](https://skmtc.dev/composal/apis/vex-api/llms.txt) - [OpenAPI document](https://skmtc.dev/composal/apis/vex-api/revisions/74298a24e040?raw)
