---
title: "Cancel Custom Harness"
method: POST
path: "/v1/custom-harnesses/{harness_id}/cancel"
tags: ["Diamond", "custom-harnesses"]
---

# Cancel Custom Harness

`POST /v1/custom-harnesses/{harness_id}/cancel`

## Request

- The document declares no server URL.
- Auth: none declared
- TypeScript: <https://skmtc.dev/vijilai/apis/vijil-console-api-combined/docs/v1/custom-harnesses/:harness_id/cancel/post.ts> (a function with typed inputs; its response is checked against the schema)

Cancel a running custom harness creation workflow.

Uses harness_id to load the harness from S3, then the harness's workflow_id to load the
workflow. If workflow_specific_fields (task_id, session_id) are present, sends cancel to the
agent; otherwise marks the workflow as cancelled so the worker will not overwrite with
success/failure. Requires agent:write permission.

## Path parameters

- `harness_id` string, uuid, required

## Query parameters

- `team_id` string, uuid, nullable: Team ID (required)

## Response `200`

Successful Response

- object

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/vijilai/apis/vijil-console-api-combined.md) - [All operations](https://skmtc.dev/vijilai/apis/vijil-console-api-combined/llms.txt) - [OpenAPI document](https://skmtc.dev/vijilai/apis/vijil-console-api-combined/revisions/a8b2ee2b2d06?raw)
