---
title: "Stop Stream"
method: POST
path: "/chats/{conversation_id}/stop"
---

# Stop Stream

`POST /chats/{conversation_id}/stop`

Stop the active stream for a conversation and release its lock.

Two things happen, in order:
  1. Signal the worker to stop generating (``stop:{conv}`` list → BLPOP in
     the worker's stop_listener).
  2. Release the stream lock so the user's follow-up message doesn't 409
     while the worker is still unwinding — it can't interrupt mid-tool-call
     and still drains background hydration before its finally, so the lock
     could otherwise be held for seconds after the user clicked Stop.

Both are gated on an actually-active stream, so we never plant a stale
``stop:`` signal that a *future* turn's worker would consume. We signal
before clearing the lock so the current worker's already-blocked BLPOP wins
the signal ahead of any (later-starting) follow-up worker.

## Path parameters

- `conversation_id` string, required

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/stardrift/apis/fastapi.md) · [All operations](https://skmtc.dev/stardrift/apis/fastapi/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/stardrift/fastapi/revisions/00746572572a/schema)
