Skip to content
Select themeSelect language

post_api_tasks_id_rerun

POST
/api/tasks/{id}/rerun
curl --request POST \
--url https://example.com/api/tasks/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/rerun \
--header 'Content-Type: application/json' \
--cookie supacloud_session=<supacloud_session> \
--data '{ "agent_profile_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "agent_type": "example", "attachments": [ "example" ], "effort": "example", "git_workflow": "example", "link_issue_id": "example", "link_issue_url": "example", "mode": "example", "model": "example", "prompt": "example", "provider": "example", "subagents": "example", "title": "example" }'
id
required
string format: uuid

Source task ID (a TERMINAL task)

Media typeapplication/json
object
agent_profile_id

Optional agent-profile re-route. Some(Some(id)) sets it, Some(None) clears it, an absent field preserves the current profile. Serde treats an absent key as None and an explicit null as Some(None).

string | null format: uuid
agent_type
string | null
attachments
Array | null
effort
string | null
git_workflow
string | null
link_issue_id
string | null
link_issue_url
string | null
mode

Axis 2 (mig 272) — the harness-native MODE (build|plan). A provided value is merged onto config.mode for the restarted run (empty clears it); an absent field preserves the existing mode. The FE Edit-&-restart panel sends this when changed.

string | null
model
string | null
prompt
string | null
provider
string | null
subagents

Axis 1 (mig 272) — the decoupled subagent toggle (on|off). A provided value is merged onto config.subagents (empty clears it); an absent field preserves it.

string | null
title
string | null
Examplegenerated
{
"agent_profile_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"agent_type": "example",
"attachments": [
"example"
],
"effort": "example",
"git_workflow": "example",
"link_issue_id": "example",
"link_issue_url": "example",
"mode": "example",
"model": "example",
"prompt": "example",
"provider": "example",
"subagents": "example",
"title": "example"
}

Forked a fresh task — returns its id

Media typeapplication/json

#708 R2 — the rerun response: the FRESH task id the fork launched (distinct from the source, whose runs/events/outcome stay intact).

object
task_id
required
string format: uuid
Examplegenerated
{
"task_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
}

Structured client error

Media typeapplication/json

The canonical JSON body of every error response — the single source of truth the frontend binds to. Every AppError serializes as this exact shape, and the generated OpenAPI component ApiErrorBody (with its ErrorCode enum) is what the frontend error schema is generated from, so there is no hand-written error schema on either end.

object
code
required

Machine-readable, stable error code.

string
Allowed values: not_found unauthorized forbidden bad_request unprocessable precondition_failed conflict method_not_allowed rate_limited quota_exceeded database_error docker_error vault_error internal_error
details
One of:
null
error
required

Human-readable message (the server’s English text; the client may localize by code).

string
Example
{
"code": "not_found"
}

Authentication required

Media typeapplication/json

The canonical JSON body of every error response — the single source of truth the frontend binds to. Every AppError serializes as this exact shape, and the generated OpenAPI component ApiErrorBody (with its ErrorCode enum) is what the frontend error schema is generated from, so there is no hand-written error schema on either end.

object
code
required

Machine-readable, stable error code.

string
Allowed values: not_found unauthorized forbidden bad_request unprocessable precondition_failed conflict method_not_allowed rate_limited quota_exceeded database_error docker_error vault_error internal_error
details
One of:
null
error
required

Human-readable message (the server’s English text; the client may localize by code).

string
Example
{
"code": "not_found"
}

Permission denied

Media typeapplication/json

The canonical JSON body of every error response — the single source of truth the frontend binds to. Every AppError serializes as this exact shape, and the generated OpenAPI component ApiErrorBody (with its ErrorCode enum) is what the frontend error schema is generated from, so there is no hand-written error schema on either end.

object
code
required

Machine-readable, stable error code.

string
Allowed values: not_found unauthorized forbidden bad_request unprocessable precondition_failed conflict method_not_allowed rate_limited quota_exceeded database_error docker_error vault_error internal_error
details
One of:
null
error
required

Human-readable message (the server’s English text; the client may localize by code).

string
Example
{
"code": "not_found"
}

Structured server error

Media typeapplication/json

The canonical JSON body of every error response — the single source of truth the frontend binds to. Every AppError serializes as this exact shape, and the generated OpenAPI component ApiErrorBody (with its ErrorCode enum) is what the frontend error schema is generated from, so there is no hand-written error schema on either end.

object
code
required

Machine-readable, stable error code.

string
Allowed values: not_found unauthorized forbidden bad_request unprocessable precondition_failed conflict method_not_allowed rate_limited quota_exceeded database_error docker_error vault_error internal_error
details
One of:
null
error
required

Human-readable message (the server’s English text; the client may localize by code).

string
Example
{
"code": "not_found"
}