Documentation Index
Fetch the complete documentation index at: https://docs.shannon.run/llms.txt
Use this file to discover all available pages before exploring further.
Endpoint
POST http://localhost:8080/api/v1/tasks/{id}/pause
Description
Pauses a running task at the next workflow checkpoint. The current activity (LLM call, tool, etc.) is allowed to finish, and then the workflow blocks until it is resumed or cancelled.
Use this when you want to temporarily stop long‑running research or supervisor workflows without losing progress.
Authentication
Required: Yes
Include API key in header:
X-API-Key: sk_test_123456
Request
| Header | Required | Description |
|---|
X-API-Key | Yes | API authentication key |
Content-Type | No | application/json if body |
traceparent | No | W3C trace context |
Path Parameters
| Parameter | Type | Required | Description |
|---|
id | string | Yes | Task ID (Temporal workflow ID) |
Body Parameters
| Parameter | Type | Required | Description |
|---|
reason | string | No | Optional pause reason note |
Request Body Example
{
"reason": "Pause while user reviews intermediate results"
}
Response
202 Accepted
{
"success": true,
"message": "Pause signal sent",
"task_id": "task-123"
}
404 Not Found
{ "error": "Task not found" }
409 Failed Precondition
Cannot pause task in invalid state:
{ "error": "cannot pause completed task" }
{ "error": "cannot pause failed task" }
{ "error": "cannot pause cancelled task" }
{ "error": "cannot pause timed out task" }
{ "error": "task is already paused" }
401 / 403
{ "error": "Unauthorized" }
or
Notes
- Pause takes effect at well‑defined checkpoints (e.g., pre_execution, pre_completion); it does not interrupt in‑flight activities.
- While paused, SSE streams will emit
workflow.pausing and workflow.paused events with a checkpoint field.
- Ownership and tenancy are enforced: users can only pause their own tasks.