---
title: "Abort session"
method: POST
path: "/session/{sessionID}/abort"
---

# Abort session

`POST /session/{sessionID}/abort`

Abort an active session and stop any ongoing AI processing or command execution.

## Path parameters

- `sessionID` string, required

## Query parameters

- `directory` string
- `workspace` string

## Response `200`

Aborted session

- boolean

## Other responses

- `400` — Bad request
- `404` — Not found

## Changes

- **2026-04-25** `0a2d50cb4204` — 1 breaking, 1 info
  - added the pattern `^ses.*` to the `path` request parameter `sessionID`
  - added the new optional `query` request parameter `workspace`

[Change history](https://skmtc.dev/kaaass/apis/opencode/changes/session/:sessionID/abort/post.md)

---

[API](https://skmtc.dev/kaaass/apis/opencode.md) · [All operations](https://skmtc.dev/kaaass/apis/opencode/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/kaaass/opencode/revisions/8bb9a15bd144/schema)
