---
title: "Cancel an in-progress test run"
method: POST
path: "/v1/test-sessions/{sessionId}/run/cancel"
tags: ["Testing"]
---

# Cancel an in-progress test run

`POST /v1/test-sessions/{sessionId}/run/cancel`

## Request

- Base URL: `http://localhost:9998`
- URL: `http://localhost:9998/v1/test-sessions/{sessionId}/run/cancel`
- Auth: HTTP bearer

Cooperatively cancels an active test run. The current step completes but the next one does not start. Returns 404 if no run is active for this session.

## Path parameters

- `sessionId` string, required

## Response `200`

Run cancelled: {cancelled: true}

## Other responses

- `404`: No active run for this session

---

[API](https://skmtc.dev/modelpiper/apis/toolpiper-api.md) · [All operations](https://skmtc.dev/modelpiper/apis/toolpiper-api/llms.txt) · [OpenAPI document](https://skmtc.dev/modelpiper/apis/toolpiper-api/revisions/6722bf56385c?raw)
