---
title: "Cancel active chat generation"
method: POST
path: "/agent/v2/chat/{id}/cancel"
tags: ["Agents"]
---

# Cancel active chat generation

`POST /agent/v2/chat/{id}/cancel`

Aborts the active OpenCode generation for this Daytona-backed chat session.

## Path parameters

- `id` string, required

## Response `200`

Generation aborted (or no active runtime)

- object
  - `id` string
  - `ok` boolean

## Other responses

- `401` — Invalid API key
- `403` — No agent access or non-API-key auth
- `404` — Chat not found

## Changes

- **2026-03-27** `220d723a75ba` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/casemark/apis/case-dev-api/changes/agent/v2/chat/: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-service-production.skmtc.workers.dev/v1/apis/casemark/case-dev-api/revisions/2a016c5bb11e/schema)
