---
title: "Reserve one allocation-bound command dispatch; subsequent requests only look up"
method: POST
path: "/api/v1/agent/persistent/compute/commands/prepare"
tags: ["agent"]
---

# Reserve one allocation-bound command dispatch; subsequent requests only look up

`POST /api/v1/agent/persistent/compute/commands/prepare`

## 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/commands/prepare`
- Auth: HTTP bearer

Trusted executor only. No provider keys or model-chosen authority. Private bodies must never enter Temporal Workflow history or heartbeat data.

## Request body

- object
  - `scope` PersistentAgentWorkerScope, required
    - `task_id` string, required
    - `segment_id` string, required
    - `generation` integer, required
    - `claim_id` string, required
  - `action` PersistentAgentToolAction, required
    - `schema` 1, required
    - `id` string, required
    - `task_id` string, required
    - `tool` string, required
    - `arguments` object, required

## Response `200`

Private allocation-bound exchange

- object
  - `operation` 'execute' | 'lookup', required
  - `dispatch` PersistentAgentWorkspaceCommandDispatch, required
    - `schema` 1, required
    - `action` PersistentAgentToolAction, required
      - `schema` 1, required
      - `id` string, required
      - `task_id` string, required
      - `tool` string, required
      - `arguments` object, required
    - `binding` object, required
      - `plan_id` string, required
      - `machine_name` string, required
      - `region` string, required
      - `provider_workspace` string, required
      - `compute_expires_at` string, required
      - `seed_digest` string, 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.
    - `deadline_unix_ms` integer, required
    - `source` object, nullable, required
      - `sequence` integer, required
      - `sha256` string, required
  - `version` string, required

## Other responses

- `401`: Compute credential unavailable or revoked
- `403`: Current task or capability unavailable
- `404`: Task unavailable
- `409`: Reconciliation required; dispatch retries are lookup only
- `422`: Invalid request
- `503`: Canonical source 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)
