---
title: "Interrupt a thread's active turn"
description: "Requests cancellation of the thread's active turn."
api_method: POST
api_path: "/v1/agent-runs/{runId}/threads/{threadId}/interrupt"
canonical_url: https://wiblo.app/docs/developers/api/agent-threads/interrupt-agent-thread
last_updated: 2026-07-28T17:31:44+02:00
md_url: https://wiblo.app/docs/developers/api/agent-threads/interrupt-agent-thread.md
---

# Interrupt a thread's active turn

`POST /v1/agent-runs/{runId}/threads/{threadId}/interrupt`

Requests cancellation of the thread's active turn. Records cancel intent and signals the active workflow supervisor; the turn ends `aborted` and the thread returns to idle through the event stream. Idempotent — interrupting a thread with no active turn still acks. Per-user rate-limited at 30/60s.

## Path parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `runId` | `string` | Yes |  |
| `threadId` | `string` | Yes |  |

## Request body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `reason` | `string` | No |  |

## Request

**curl**

```bash
curl https://api.wiblo.app/v1/agent-runs/{runId}/threads/{threadId}/interrupt \
  -X POST \
  -H "Authorization: Bearer $WIBLO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "reason": "..."
}'
```

**TypeScript**

```ts
import { createSdk, interruptAgentThread } from "@workspace/sdk"

const sdk = createSdk({ baseUrl: "https://api.wiblo.app" })

const { data, error } = await interruptAgentThread({
  client: sdk,
  path: { runId: "...", threadId: "..." },
  body: {
    "reason": "..."
  },
})
```

## Responses

**`200`** — The cancel intent was recorded. Returns `InterruptThreadResponse`.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `threadId` | `string` | Yes |  |
| `status` | `"cancel_requested"` | Yes |  |

**`400`** — Request body failed Zod validation (`VALIDATION_FAILED`). Returns `ApiErrorEnvelope`.

**`401`** — No valid session cookie or `wbl_*` bearer was present. Returns `ApiErrorEnvelope`.

**`404`** — No thread visible to the caller with this id in this run (`AGENT_THREAD_NOT_FOUND`). Returns `ApiErrorEnvelope`.

**`422`** — Path param failed UUID validation (`INVALID_PARAMS`). Returns `ApiErrorEnvelope`.

**`429`** — Rate limit exceeded. The body's `error.code` is `RATE_LIMITED` and `error.details.retry_after` is the same number of seconds as the `Retry-After` header. Returns `ApiErrorEnvelope`.
