---
title: "Cancel Session Execution"
method: POST
path: "/sessions/{session_id}/cancel"
tags: ["Sessions", "Sessions"]
---

# Cancel Session Execution

`POST /sessions/{session_id}/cancel`

## Path parameters

- `session_id` string, required

## Request body

- SessionCancelRequest
  - `expected_execution_id` string, nullable — Optional stale-request guard honored only in cancel mode; ignored for send, steer, and attach.

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

## Changes

- **2026-09-05** `2f5818dfac1f` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/agenta-ai/apis/agenta-api/changes/sessions/:session_id/cancel/post.md)

---

[API](https://skmtc.dev/agenta-ai/apis/agenta-api.md) · [All operations](https://skmtc.dev/agenta-ai/apis/agenta-api/llms.txt) · [OpenAPI document](https://skmtc.dev/agenta-ai/apis/agenta-api/revisions/9fe8525d5c27?raw)
