---
title: "Cancel native Linc session turn"
method: POST
path: "/linc/v1/sessions/{id}/cancel"
tags: ["Agents/Linc"]
---

# Cancel native Linc session turn

`POST /linc/v1/sessions/{id}/cancel`

## Request

- Base URL: `https://api.case.dev`
- URL: `https://api.case.dev/linc/v1/sessions/{id}/cancel`
- Auth: HTTP bearer

Sends an abort RPC to the session runtime, ending the current turn while keeping the session alive. Body handling is intentionally lenient — cancel is a stop control, so unknown fields are ignored and an invalid or missing body is treated as empty rather than rejected.

## Path parameters

- `id` string, required

## Request body

- object
  - `clearQueue` boolean: Also clear queued steering/follow-up messages so the abort leaves the agent fully idle. Cleared texts are returned in the `response.data.clearedQueue` field of the response body. Without it, messages still queued when the abort settles are auto-continued as a new run. Runtimes older than the Linc release that supports this flag ignore it: the abort still happens but the queue is left untouched.

## Response `200`

Cancel accepted. Includes the native Pi RPC abort response as `response` (with `response.data.clearedQueue` when clearQueue was requested and the runtime supports it).

## Other responses

- `401`: Invalid API key
- `403`: No agent access or Linc runtime disabled
- `404`: Linc session not found

## Changes

- **2026-10-16** `a21d188f4b21`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/casemark/apis/case-dev-api/changes/linc/v1/sessions/:id/cancel/post.md)

---

[API](https://skmtc.dev/casemark/apis/case-dev-api.md) - [All operations](https://skmtc.dev/casemark/apis/case-dev-api/llms.txt) - [OpenAPI document](https://skmtc.dev/casemark/apis/case-dev-api/revisions/9a3245c00044?raw)
