---
title: "Attach a confirmed original task workflow chain"
method: POST
path: "/api/v1/agent/persistent/tasks/attach_workflow"
tags: ["agent"]
---

# Attach a confirmed original task workflow chain

`POST /api/v1/agent/persistent/tasks/attach_workflow`

## 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/tasks/attach_workflow`
- Auth: HTTP bearer

Internal scheduler/Activity port. Requires a non-delegable input-scoped capability; a user, repository or inference-worker token is insufficient. The trusted adapter must first start or look up the exact stable workflow identity and report its first execution run. A receipt records orchestration attachment, not task execution/completion. Maximum body: 16384 bytes. No production dispatch adapter is installed.

## Request body

- object
  - `workflow_id` string, required
  - `first_execution_run_id` string, uuid, required

## Response `200`

Canonical handoff state; this never grants model/tool execution. start_allowed=false permits lookup/receipt repair only, not a fresh workflow start.

- PersistentAgentTaskWorkflowAttachment
  - `task_id` string, required
  - `workflow_id` string, required
  - `start_allowed` false, required
  - `first_execution_run_id` string, uuid, required
  - `wake_required` false, required

## Other responses

- `401`: Invalid, expired, superseded or disabled-agent dispatch capability
- `403`: Current task dispatch operation is not authorized
- `404`: Not found
- `409`: Canonical conflict or different workflow chain; reconcile the original identity
- `422`: Invalid or oversized JSON request
- `502`: Bad gateway
- `503`: Canonical state is temporarily unavailable; retry without inventing another task/workflow identity

---

[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)
